Syntaxfehler im Code......Danke für Hilfe
22.04.2004 11:59:56
Peter S.
ich habe mir ne combobox gebastelt mit untenstehendem Code.....aber beim
Private Sub cmdOK bringt er mir nen Syntaxfehler:
Private Sub cboNamen_Change()
Dim iCounter As Integer, iRow As Integer
Dim sSelect As String
With cboNamen
If .ListIndex >= 0 Then
sSelect = .List(.ListIndex, 1) & " " & .List(.ListIndex, 0)
iRow = .ListIndex
cboNamen.Text = sSelect
End If
For iCounter = 1 To 2
Controls("txtEdit" & iCounter).Text = .List(iRow, iCounter - 1)
Next iCounter
End With
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Range("txtEdit" & iCounter).Tag.Value = ("txtEdit" & iCounter).Text
End Sub
Private Sub txtEdit2_Change()
End Sub
Private Sub txtEdit1_Change()
End Sub
Private Sub UserForm_Initialize()
cboNamen.List = Range("C1").CurrentRegion.Value
cboNamen.ListIndex = 0
End Sub
Bitte um Hilfe und vielen Dank
Peter S.