View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Selecti Page in Userform by Name not Number

The problem is you are trying to use the Caption property to identify the
Page within the collection, not the Page's name. When you click on the tab
for the "Main Menu", look at the Properties window... see the Name, it is
Page8 (or whatever number your page is). Change the name to MainMenu
(notice, because it is a name, you can't have a separating space in it);
now, change "Main Menu" to "MainMenu" in your code statement and it should
work the way you are expecting.

Rick


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