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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|