Wie ist es möglich den Namen der Textbox in einer Multipage zu ermitteln?
Eines meiner vielen Fehlschläge (fehlversuche):
MsgBox MultiPage1.Pages(2).ActiveControl.Name
wie sollte die "Abfrage aussehen?
Gruß
Lorenz
Private Sub CommandButton1_Click()
' Eintragen in Tabelle
'ThisWorkbook.Worksheets("Tabelle1").Range("B14") = CDate(ComboBox1 & "." & ComboBox2 & "." _
& ComboBox3)
'Eintragen in Textbox
'Userform1.Textbox78 = CDate(ComboBox1 & "." & ComboBox2 & "." & ComboBox3),
soweit funkt ja alles.
'Hier mein nicht funktionierendes WunschEintragen in zuvor gewählte (selectierte) Textbox( _
en)
Selected.Control = CDate(ComboBox1 & "." & ComboBox2 & "." & ComboBox3)
Unload Me
End Sub
GrüßePrivate Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
With UserForm2
Set .TextBox = TextBox1
Call .Show
End With
End Sub
In deinem Kalender (bei mir UserForm2):Option Explicit
Private mobjTextBox As MSForms.TextBox
Private Sub CommandButton1_Click()
TextBox.Text = Format$(ComboBox1.Text & "." & _
ComboBox2.Text & "." & ComboBox3.Text, "dd.mm.yyyy")
Call Unload(Object:=Me)
End Sub
Private Sub UserForm_Terminate()
Set TextBox = Nothing
End Sub
Friend Property Get TextBox() As MSForms.TextBox
Set TextBox = mobjTextBox
End Property
Friend Property Set TextBox(ByRef probjTextBox As MSForms.TextBox)
Set mobjTextBox = probjTextBox
End Property
Private Sub txb47_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim strName As String
wksStart.Cells(2, 1) = ActiveControl.Name
strName = wksStart.Cells(2, 1)
With frmKalenderersatz
Set .TextBox = Controls(strName)
Call .Show
End With
End Sub
Private Sub txb47_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
With frmKalenderersatz
Set .TextBox = txb47
Call .Show
End With
End Sub