Option Explicit
Private Sub CommandButton1_Click()
MsgBox MultiPage1.Pages(Left(MultiPage1.Tag, 5)).Controls("TextBox" & Right(MultiPage1.Tag, _
1))
End Sub
Private Sub TextBox1_Change()
MultiPage1.Tag = "Page1;1"
End Sub
Private Sub TextBox2_Change()
MultiPage1.Tag = "Page2;2"
End Sub
Private Sub MultiPage1_Change()
If MultiPage1.SelectedItem.Name = "Page1" Then
MsgBox TextBox1
Else
MsgBox TextBox2
End If
End Sub
Wenn doch erst beim Drücken des CommandButtons, dann so
Private Sub CommandButton1_Click()
If MultiPage1.SelectedItem.Name = "Page1" Then
MsgBox TextBox1
Else
MsgBox TextBox2
End If
End Sub