A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

hiding/unhiding rows



 
 
Thread Tools Display Modes
  #1  
Old March 16th, 2010, 05:41 PM posted to microsoft.public.excel.worksheet.functions
ART
external usenet poster
 
Posts: 432
Default hiding/unhiding rows

I know I can create a macro that allows a user to, say, press CTRL-H and the
first three rows of my spreadsheet will become hidden. (Some users prefer
having more real estate space and have more rows show at one time.)

However, is there a way to force those rows to be unhidden when the
spreadsheet is reopened (especially if the previous user saved the
spreadsheet with the first three rows hidden)?

Thanks!!!
  #2  
Old March 16th, 2010, 06:00 PM posted to microsoft.public.excel.worksheet.functions
Paul C
external usenet poster
 
Posts: 202
Default hiding/unhiding rows

You can run a macro when the sheet is opened using the Auto_Open

Private Sub Auto_Open()
'Do stuff like unhide rows
End Sub

Of course if the user has macros disabled this does not work.

As a alternative you could use a Before Save event.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel as Boolean)
'Unhide hidden rows
End Sub

This would ensure that the saved version has the rows unhidden since if they
were hidden via a macro, macros must be enabled. The disadvantage is that if
a user saves the rows would unhide even if they are not closing the file.

You could of course get fancy and program some kind of cancel funtion if
they are not closing. (MsgBox, custome form with message, etc..)
--
If this helps, please remember to click yes.


"Art" wrote:

I know I can create a macro that allows a user to, say, press CTRL-H and the
first three rows of my spreadsheet will become hidden. (Some users prefer
having more real estate space and have more rows show at one time.)

However, is there a way to force those rows to be unhidden when the
spreadsheet is reopened (especially if the previous user saved the
spreadsheet with the first three rows hidden)?

Thanks!!!

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.