PC Review


Reply
Thread Tools Rate Thread

How to disable and enable multipage elements during runtime?

 
 
Yajiv
Guest
Posts: n/a
 
      26th Feb 2008
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 With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      26th Feb 2008

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
 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      26th Feb 2008
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" <(E-Mail Removed)> wrote in message
news:6dc12321-8194-432f-971d-(E-Mail Removed)...
>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 With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      26th Feb 2008
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)" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:6dc12321-8194-432f-971d-(E-Mail Removed)...
>>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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable Property of Multipage Control Pages = CheckBox.Value RyanH Microsoft Excel Programming 2 13th May 2008 02:10 PM
MultiPage: How to enable controls in Frame on Page =?Utf-8?B?VGV0c3V5YSBPZ3VtYQ==?= Microsoft Excel Programming 0 6th Nov 2006 02:51 AM
Best Place to Disable/Enable Menu Items at Runtime Raeldor Microsoft Dot NET Framework 5 9th Aug 2006 03:37 AM
Is it possible to disable a tab/page on a multipage Userform? =?Utf-8?B?VHJlZm9y?= Microsoft Excel Programming 4 19th Apr 2006 05:24 PM
Enable/disable page on multipage Phillip Topping Microsoft Excel Programming 3 24th Nov 2003 02:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:58 PM.