I'm not sure I understand why you used a While/Wend loop. Since there is
only one ActiveControl on your UserForm, and only one selected Page on the
MultiPage and only one ActiveControl on that selected Page, I don't see what
you are looping through. Of course, I don't know what the rest of your
program is doing, but (off the top of my head) it seems like this should do
what I think your code snippet is attempting to do....
Set ctrl = frm.ActiveControl
If TypeOf ctrl Is msforms.MultiPage Then
Set ctrl = ctrl.SelectedItem.ActiveControl
End If
Do the above assumes, I guess, that you have more than one MultiPage control
on your form and you want to work with whichever one is the currently
ActiveControl. If, however, you only have one MultiPage control on your
form, you should be able to set ctrl to its ActiveControl (on its selected
Page) directly like this...
Set ctrl = frm.MultiPage1.SelectedItem.ActiveControl
(again, that was off the top of my head and untested) where you would use
the name of your MultiPage control in place of the name MultiPage1 that I
used.
Rick