Gefundene Werte im Format HH:MM?
24.02.2004 11:54:36
Ina
wie kann ich es anstellen, dass die gefundenen Werte in meiner UserForm in den TextBoxen 2-5 und 7-17 im Format HH:MM angezeigt werden?
Private Sub CommandButton2_Click()
Dim myRange As Range, intIndex As Integer
If Trim$(TextBox1) <> "" Then
With Worksheets("SCHICHT1").Range("B8:B107")
Set myRange = .Find(What:=Trim$(TextBox1), LookIn:=xlValues, LookAt:=xlWhole)
If Not myRange Is Nothing Then
For intIndex = 1 To 5
Controls("TextBox" & CStr(intIndex)) = Cells(myRange.Row, intIndex + 1)
Next
For intIndex = 1 To 7
If Cells(myRange.Row, intIndex + 6) = "X" Then Controls("CheckBox" & CStr(intIndex)) = True
Next
For intIndex = 6 To 17
Controls("TextBox" & CStr(intIndex)) = Cells(myRange.Row, intIndex + 8)
Next
Set myRange = Nothing
Else
MsgBox "Kein Eintrag vorhanden.", 64, "Information"
End If
End With
End If
End If
End Sub
Wer kann mir helfen und den Code entsprechend umstricken??
Vielen Dak im Voraus!!
Gruss, Ina