abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,429
- Office Version
- 2019
- 2010
- Platform
- Windows
hello
I have a problem about serial number in textbox1,2 on userform with use multipage1 and fram1
so my textbox is found in page 1 and frame1
so any body can fix my code to work ,please ?
I have a problem about serial number in textbox1,2 on userform with use multipage1 and fram1
so my textbox is found in page 1 and frame1
so any body can fix my code to work ,please ?
VBA Code:
Private Sub TextBox1_Change()
For Each cCont In Me.MultiPage1.Pages(0).Controls
If TypeName(cCont) = "TextBox" Then
If Me.TextBox2.Value <> "" Then
MM = WorksheetFunction.CountA(Range("a1:a1000"))
Me.TextBox1 = MM + 1
Else
Me.TextBox1 = ""
End If
End If
Next
End Sub