hello
I have this form as in picture and it doesn't copy the values from controls to ranges in sheet
so what suggest to do that ?
thanks
I have this form as in picture and it doesn't copy the values from controls to ranges in sheet
so what suggest to do that ?
VBA Code:
Private Sub CommandButton1_Click()
Dim lr As Integer
Dim ctrl As Control
With sheet1
lr = .Range("c" & Rows.Count).End(xlUp).Row + 1
r = UserForm1.MultiPage1.Value
For Each ctrl In UserForm1.MultiPage1.Pages(r).Controls
If TypeName(ctrl) = "textbox" & "combobox" Then
.Range("a" & lr) = Me.TextBox1
.Range("B" & lr) = Me.TextBox2
.Range("c" & lr) = Me.ComboBox1
End If
Next ctrl
End With
End Sub
thanks