Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Using ActiveSheet to Disable Multipage1

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Using ActiveSheet to Disable Multipage1

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Using ActiveSheet to Disable Multipage1

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 :(

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Using ActiveSheet to Disable Multipage1

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 :(


  #5   Report Post  
Posted to microsoft.public.excel.programming
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

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
Copying new activesheet after other activesheet is hidden? Simon Lloyd[_790_] Excel Programming 1 June 20th 06 10:02 AM
activesheet Jim at Eagle Excel Programming 1 April 6th 05 12:21 AM
name of the activesheet rasta Excel Programming 1 October 3rd 03 09:49 PM
ActiveSheet.Name? Andrew Stedman Excel Programming 5 July 30th 03 01:17 PM
ActiveSheet Ron de Bruin Excel Programming 0 July 29th 03 04:59 PM


All times are GMT +1. The time now is 09:35 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"