I have been using the following code for cycling through textboxes on a userform and dumping their values onto a temp worksheet:
i = 1
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Then
ThisWorkbook.Sheets("Temp Values").Cells(i, 1) = ctl.Value
i = i + 1
End If
Next ctl
I need to modify it now to just dump values for one tab within a multipage control on a userform (I have a multipage control with 9 tabs or so and 10 or so textboxes per tab). It should not dump values for any other tab than the one that I will specify in the code. How can I modify the For Each statement to tell the code to just look on the tab. Or is there another way to do this? Thanks.
- Craig
i = 1
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Then
ThisWorkbook.Sheets("Temp Values").Cells(i, 1) = ctl.Value
i = i + 1
End If
Next ctl
I need to modify it now to just dump values for one tab within a multipage control on a userform (I have a multipage control with 9 tabs or so and 10 or so textboxes per tab). It should not dump values for any other tab than the one that I will specify in the code. How can I modify the For Each statement to tell the code to just look on the tab. Or is there another way to do this? Thanks.
- Craig