Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Enable/disable page on multipage

I have a user form with a multipage on it.

Most of the time all the pages are enabled but there will
be some occasions that when the form loads, I will need to
disable all but one of the pages. I know I can disable
them just by changing their enabled/disabled status in the
form design but this does not help me.

I need to be able to change their status dependent on the
results of cell contents using If..Then etc.

I cannot find any way in VB to help me do this.

Any suggestions would be greatly appreciated.
TIA
Phillip

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Enable/disable page on multipage

Something like:

Private Sub UserForm_Initialize()
If Range("A1") = "X" Then
MultiPage1.Pages(1).Enabled = True
Else
MultiPage1.Pages(1).Enabled = False
End If
End Sub

--

Vasant



"Phillip Topping" wrote in message
...
I have a user form with a multipage on it.

Most of the time all the pages are enabled but there will
be some occasions that when the form loads, I will need to
disable all but one of the pages. I know I can disable
them just by changing their enabled/disabled status in the
form design but this does not help me.

I need to be able to change their status dependent on the
results of cell contents using If..Then etc.

I cannot find any way in VB to help me do this.

Any suggestions would be greatly appreciated.
TIA
Phillip



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Enable/disable page on multipage

Hi Vasant,
Thanks for your help, this is the line of code that I kept
getting wrong but you have solved it for me.

MultiPage1.Pages(1).Enabled = True

(or false as the case may be)

I had all the other logic sorted, just kept getting the
syntax of that line wrong.

Thanks again :)
Phillip

-----Original Message-----
Something like:

Private Sub UserForm_Initialize()
If Range("A1") = "X" Then
MultiPage1.Pages(1).Enabled = True
Else
MultiPage1.Pages(1).Enabled = False
End If
End Sub

--

Vasant



"Phillip Topping"

wrote in message
...
I have a user form with a multipage on it.

Most of the time all the pages are enabled but there

will
be some occasions that when the form loads, I will need

to
disable all but one of the pages. I know I can disable
them just by changing their enabled/disabled status in

the
form design but this does not help me.

I need to be able to change their status dependent on

the
results of cell contents using If..Then etc.

I cannot find any way in VB to help me do this.

Any suggestions would be greatly appreciated.
TIA
Phillip



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Enable/disable page on multipage

Glad to help ... I can't tell you how often I overlook obvious solutions
that are staring me in the face!

--

Vasant


"Phillip Topping" wrote in message
...
Thanks again :)


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable/Disable Macros Pop-Up juamig Excel Discussion (Misc queries) 1 April 9th 10 06:29 PM
activate a page of a Multipage in Userform Jeff Excel Discussion (Misc queries) 1 February 8th 08 06:16 PM
Enable/Disable macros Adam Excel Discussion (Misc queries) 2 March 11th 05 10:29 AM
Can I set a page of a Multipage form to active? John T Ingato Excel Programming 2 October 11th 03 12:15 AM
Enable/Disable Macros Joseph[_6_] Excel Programming 3 August 23rd 03 02:54 PM


All times are GMT +1. The time now is 11:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"