Hi,
I have created a Multipage userform, with 4 Text Boxes.
I am using a button to add a New page and copy the controls from the First page dynamically
But this code also copies the data entered in the new page. Is there any way I can copy only the form, with no values ?
Below is code i am using.
Requirement : The new pages added should be empty with no values in the text boxes
Private Sub CommandButton1_Click()
Dim l As Double, r As Double
Dim ctl As Control
If x = 19 Then
MsgBox ("You can add only 20 Level 4 Categories")
ElseIf x <> 19 Then
MultiPage1.Pages.Add ("Level 4-" & x + 2)
x = x + 1
i = i + 1
MultiPage1.Pages(0).Controls.Copy
MultiPage1.Pages(x).Paste
End If
End Sub
I have created a Multipage userform, with 4 Text Boxes.
I am using a button to add a New page and copy the controls from the First page dynamically
But this code also copies the data entered in the new page. Is there any way I can copy only the form, with no values ?
Below is code i am using.
Requirement : The new pages added should be empty with no values in the text boxes
Private Sub CommandButton1_Click()
Dim l As Double, r As Double
Dim ctl As Control
If x = 19 Then
MsgBox ("You can add only 20 Level 4 Categories")
ElseIf x <> 19 Then
MultiPage1.Pages.Add ("Level 4-" & x + 2)
x = x + 1
i = i + 1
MultiPage1.Pages(0).Controls.Copy
MultiPage1.Pages(x).Paste
End If
End Sub