Selecti Page in Userform by Name not Number
Did you rename the page to that Name? Notice the OP has a space in his
"name", which must mean he is trying to reference the page through its
Caption, not its Name.
Rick
"carlo" wrote in message
...
Wait a second...i just tried it and this works for me:
me.multipage1.pages("mypage").enabled = true
what excel are you using?
Carlo
On Dec 21, 11:04 am, carlo wrote:
I don't think that you can do it that easily, what you can do is run
through all pages and look for the name:
'----------------------------------
Function return_pageNum(PageName As String) As Byte
return_pageNum = 0
For i = 0 To Me.MultiPage1.Pages.Count
Debug.Print Me.MultiPage1.Pages(i).Name
If LCase(Me.MultiPage1.Pages(i).Name) = LCase(PageName) Then
return_pageNum = i
Exit For
End If
Next i
End Function
'----------------------------------
if there is an easier possibility, i'm eager to learn.
cheers carlo
On Dec 21, 10:49 am, Trefor wrote:
I understand the use of this command:
Menu.MultiPage1.Pages(8).Enabled = True
BUT what I would like to do is not use a page number and use the Pages
name
instead, is this possible?
Something like:
Menu.MultiPage1.Pages("Main Menu").Enabled = True
--
Trefor- Hide quoted text -
- Show quoted text -
|