View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] gwoodby@gmail.com is offline
external usenet poster
 
Posts: 58
Default Using ActiveSheet to Disable Multipage1

On Nov 2, 3:06 pm, Michael wrote:
So what are you trying to do. I assume you have created a Form named FormLoad
and you have placed an page oject and you have named page1 = Dependency and
page2 = TPR. However, it appears all you want is to set the visible attribute
to false if the name of the sheet is Shelter.
Maybe a little more information will help.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.



" wrote:
On Nov 2, 2:05 pm, Michael wrote:
Try changing the following piece of your code:
If sh.Name = "Shelter" Then
FormLoad.MultiPage1.Pages ("Dependency") And _
FormLoad.MultiPage1.Pages("TPR").Visible = False
End If


--
If this posting was helpful, please click on the Yes button.
Regards,


Michael Arch.


" wrote:
Is this Correct??? Cause its not working it Gives me the Error Invalid
Use of Property With the Word Pages Highlighted :| Any Idea How to do
this?


Private Sub Found(StrNameFound As String)
Dim sh As Worksheet
Set sh = ActiveSheet
If sh = Worksheets("Shelter") Then
FormLoad.MultiPage1.Pages ("Dependency") And _
FormLoad.MultiPage1.Pages("TPR").Visible = False
End If- Hide quoted text -


- Show quoted text -


It Still gives me the error Invalid use of Property for the .Pages :(- Hide quoted text -


- Show quoted text -


I ended Up just removing the tabs and If sh.Name = "Shelter" Then
FormLoad.MultuPage1.Value = 0
:) But ty for the help,

FormLoad is the userform,
then there is a multipage object with 3 Pages , shelter , Dependency,
and TPR :)
This Code is in a selection button prior to opening the page, but i
found this way around it and it actually looks better i think :D