Working with worksheet groups

B

Bob K

I have been using the group selection feature of Excel for
years to print multiple worksheets all at once or to apply
formatting to a set of worksheets. My problem is that the
indicator at the bottom of the screen in not very
noticeable and too often I save a file with worksheet
groups enabled and when I reopen it later I enter numbers
in cells and everything gets screwed up.

I created a macro in Word to select the entire page, update
all fields and then print. Is it possible to create a macro
that prints all the worksheets if groups are turned on and
then turns off groups when the printing is done. Similarly
when a file is closed it turns off groups before saving the
file.

I have looked in the tool bar for buttons to turn groups
off and on and cannot find them.

Thanks for any help.

Bob Kufrin
[email protected]
 
S

swatsp0p

Place this code in the 'thisworkbook':

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("sheet1").Select
End Sub

You could also place it as 'BeforeSave'.

Good Luc
 
B

Bob K

nospam.com>, swatsp0p.1x5y2a_1129748703.0885@excelforum-
nospam.com says...
Place this code in the 'thisworkbook':

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("sheet1").Select
End Sub

You could also place it as 'BeforeSave'.

Good Luck
Thanks I will try it today. I appreciate your response.
 
Top