Hi there,
I have userform1 with a multipage on it. I need the captions for the multipage form to be populated from specific cell values. My issue is I need the range from A7 to A15 only, but I get way more than I need with this code found earlier... Any suggestions?
Private Sub UserForm_Initialize()
Dim pagecount As Long
Dim n As Long
pagecount = Sheets("Part Spec.").Range("a" & Rows.count).End(xlUp).Row - 5
n = 0
With MultiPage1
Do
If n >= .Pages.count Then .Pages.Add
.Pages
.Caption = Sheets("Part Spec.").Range("a" & n + 6).Value
n = n + 1
Loop Until n = pagecount
End With
End Sub
I have userform1 with a multipage on it. I need the captions for the multipage form to be populated from specific cell values. My issue is I need the range from A7 to A15 only, but I get way more than I need with this code found earlier... Any suggestions?
Private Sub UserForm_Initialize()
Dim pagecount As Long
Dim n As Long
pagecount = Sheets("Part Spec.").Range("a" & Rows.count).End(xlUp).Row - 5
n = 0
With MultiPage1
Do
If n >= .Pages.count Then .Pages.Add
.Pages

n = n + 1
Loop Until n = pagecount
End With
End Sub