Using ActiveSheet to Disable Multipage1

G

gwoodby

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
 
M

Michael

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
 
G

gwoodby

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.






- Show quoted text -

It Still gives me the error Invalid use of Property for the .Pages :(
 
M

Michael

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.
 
G

gwoodby

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.






- 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top