Für Array Spezialisten (VBA)
Peter
Hallo Forum,
lässt sich die beigefügte Prozedur vereinfachen?
Danke Peter
Private Sub CmdSpeichern_Click()
Dim i As Long
Dim ShQ As Worksheet
Set ShQ = Worksheets("Test")
With ShQ
.Cells(2, 58).ClearContents
'.Cells(2, 59).Clear
'.Cells(2, 60).Clear
'.Cells(2, 61).Clear
For i = 1 To 5
.Cells(2, 58) = .Cells(2, 58) & ";" & Me.Controls("TxtKWA" & i).Text
' .Cells(2, 59) = .Cells(2, 59) & ";" & Me.Controls("TxtWZA" & i).Text
' .Cells(2, 60) = .Cells(2, 60) & ";" & Me.Controls("TxtTGA" & i).Text
' .Cells(2, 61) = .Cells(2, 61) & ";" & Me.Controls("TxtSOA" & i).Text
Next i
.Cells(2, 58) = Right(.Cells(2, 58), Len(.Cells(2, 58)) - 1)
'.Cells(2, 59) = Right(.Cells(2, 59), Len(.Cells(2, 59)) - 1)
'.Cells(2, 60) = Right(.Cells(2, 60), Len(.Cells(2, 60)) - 1)
'.Cells(2, 61) = Right(.Cells(2, 61), Len(.Cells(2, 61)) - 1)
End With
End Sub