Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How to disable and enable multipage elements during runtime?

I have a multipage with four pages. I want to enable them when some
condition is satisfied. How can i do that? The intelli-sense is not
displaying my page names.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to disable and enable multipage elements during runtime?


Dim mCtr As Long
For mCtr = 0 To Me.MultiPage1.Pages.Count - 1
Me.MultiPage1.Pages(mCtr).Enabled = True
Next mCtr

To toggle the .enabled property:

With Me.MultiPage1.Pages(mCtr)
.Enabled = Not .Enabled
End With

Yajiv wrote:

I have a multipage with four pages. I want to enable them when some
condition is satisfied. How can i do that? The intelli-sense is not
displaying my page names.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to disable and enable multipage elements during runtime?

Try it this way...

With MultiPage1
For X = 1 To .Pages.Count
MultiPage1.Pages(X).Enabled = True
Next
End With

You can address individual pages via its Index in the Pages collection.

Rick


"Yajiv" wrote in message
...
I have a multipage with four pages. I want to enable them when some
condition is satisfied. How can i do that? The intelli-sense is not
displaying my page names.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to disable and enable multipage elements during runtime?

Whoops! Dave is right... the Indexes for MultiPage are zero-based, so my
code should have been...

With MultiPage1
For X = 0 To .Pages.Count - 1
MultiPage1.Pages(X).Enabled = True
Next
End With

Rick


"Rick Rothstein (MVP - VB)" wrote in
message ...
Try it this way...

With MultiPage1
For X = 1 To .Pages.Count
MultiPage1.Pages(X).Enabled = True
Next
End With

You can address individual pages via its Index in the Pages collection.

Rick


"Yajiv" wrote in message
...
I have a multipage with four pages. I want to enable them when some
condition is satisfied. How can i do that? The intelli-sense is not
displaying my page names.



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 Macro D Excel Programming 2 January 11th 08 04:18 PM
MultiPage: How to enable controls in Frame on Page Tetsuya Oguma Excel Programming 0 November 6th 06 02:51 AM
Is it possible to disable a tab/page on a multipage Userform? Trefor Excel Programming 4 April 19th 06 05:24 PM
Enable/Disable Macro Brandon[_5_] Excel Programming 0 June 1st 04 06:36 PM
Enable/disable page on multipage Phillip Topping Excel Programming 3 November 24th 03 02:07 AM


All times are GMT +1. The time now is 03:06 PM.

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

About Us

"It's about Microsoft Excel"