View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
AltaEgo AltaEgo is offline
external usenet poster
 
Posts: 245
Default expand or collapse

Depends exactly how you wish to do and how you wish to do it.

This will toggle the visible property of both sheets (i.e. hide one and
unhide the other) but will not make both visible at once. However if you
have a little experience writing VBA, it should give enough information to
write your own.

Sub ToglSheets()

If Sheets("Accts").Visible = False Then
Sheets("Accts").Visible = True
Sheets("med").Visible = False
Else
Sheets("med").Visible = True
Sheets("accts").Visible = False
End If

End Sub


Now you need your users to be able to access the code. This will show you
how to set up a custom menu.

http://www.ozgrid.com/VBA/custom-menus.htm

This tells you all you need to know including how to add your menu when your
workbook opens and delete it when your workbook closes.

--
Steve

"mac" wrote in message
...
Hello,

I am not sure I am posting to the proper place. My boss gave me an
assignment and I am not sure how to go about it. I have a workbook that I
send to client and they fill out . There is 2 different types of data to
do
different reports. I would like to set up a button or macro that if the
check either Med or Accts or Both that would show only the type of data
for
each report. ex: if it only Med data then I want to hide Accts worksheets
and if it is Accts then I would like to hide Med worksheets. I hope I am
making sense.
Any help would be GREATLY APPRECIATED.

THANK YOU
--
thank you mac