Hallo Experten !
Mit dem folgenden UserForm möchte ich unter anderem dem User
ermöglichen in der TextBox (DganzenTag) ein Datum einzugeben.
Wie kann ich aber sicherstellen, dass wirklich ein Datum mit dem
Format tt.dd.jjjj eingegeben wird?
Grüße und vielen Dank!!!
Peter
Option Explicit
Private Sub CheckBox1_Click()
If CheckBox1 = True Then DganzenTag.Enabled = True
If CheckBox1 = False Then DganzenTag.Enabled = False
End Sub
Private Sub CommandButton1_Click()
Selection.GoTo What:=wdGoToBookmark, Name:=„Name“
Selection.TypeText Text:=TextBox1
Selection.GoTo What:=wdGoToBookmark, Name:=„Abt“
Selection.TypeText Text:=TextBox2
Selection.GoTo What:=wdGoToBookmark, Name:=„Tel“
Selection.TypeText Text:=TextBox3
Selection.GoTo What:=wdGoToBookmark, Name:=„ganzenTag1“
If OptionButton1.Value = True Then Selection.TypeText
Text:=„TextBox1“
If OptionButton2.Value = True Then Selection.TypeText
Text:=„TextBox2“
If OptionButton3.Value = True Then Selection.TypeText
Text:=„TextBox3“
Selection.GoTo What:=wdGoToBookmark, Name:=„ganzenTag1“
If CheckBox1 = True Then Selection.InsertSymbol Font:=„Wingdings“, _
CharacterNumber:=253: Selection.TypeText Text:=" Ganzer Tag am ":
Selection.TypeText Text:=DganzenTag
Unload Me
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
MsgBox "Der hinterlegte Benutzername: " & Application.UserName
Zeitausgleich.Show
End Sub