Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Hide rows if...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Saintsman - 18 Sep 2007 14:52 GMT
Can anyone help please

I want to hide row10 on sheet 2 if sheet1 A1=Yes,
but every time I make a copy of sheet1 the same requirement is needed to the
new sheet.  Always hide the same row (possibly rows) on each sheet

Any takers

Thanks in advance
Saintsman
JE McGimpsey - 18 Sep 2007 15:50 GMT
Your question is rather ambiguous - I'll assume you mean that row 10 on
any sheet other than Sheet1 needs to be hidden if Sheet1!A1 = Yes...

Put this code in our ThisWorkbook code module:

   Private Sub Workbook_SheetActivate(ByVal Sh As Object)
       If Sh.Name <> "Sheet1" Then
           Sh.Rows(10).Hidden = Sheets("Sheet1").Range("A1") = "Yes"
       End If
   End Sub

> Can anyone help please
>
[quoted text clipped - 6 lines]
> Thanks in advance
> Saintsman
Saintsman - 18 Sep 2007 16:08 GMT
Sorry for any ambiguity!
It is not for every sheet except sheet1
The sheet will be 1 of many similar calculation sheets, each of which needs
the function to hide specific rows if sheet1 A1 = Yes (same rows in each case)
There are other sheets which should not have the function.
My plan was to have a sort of template sheet with the function on, which is
then available every time a copy of that sheet is made

> Your question is rather ambiguous - I'll assume you mean that row 10 on
> any sheet other than Sheet1 needs to be hidden if Sheet1!A1 = Yes...
[quoted text clipped - 17 lines]
> > Thanks in advance
> > Saintsman
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.