Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() -- I have a worksheet that shows a weeks roster for 2 locations. What I would like to be able to do is to have 2 option buttons such that depending on the selection the print area would be set and the appropriate locations roster be printed. OptionbuttonSW would set the print area as A$2:$H$9 OptionbuttonMW would set the print area as $A$11:$H$27 Al |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In XL add the Contol Toolbox to your list of toolbars. Drag 2 option buttons
onto your sheet. Right click on of the buttons and change the (Name) to optSW and the Caption to SW. Select the other button and make the (Name) optMW with a Caption of MW. Double click either of the option buttons. This takes you to the VBE with a on click code stub for that button. Add the following... Private Sub optMW_Click() Me.PageSetup.PrintArea = "A11:H27" End Sub Private Sub optSW_Click() Me.PageSetup.PrintArea = "A1:H9" End Sub Now go back to the worksheet and exit design mode by clicking on the Ruler and Triangle icon on the Control Toolbox... -- HTH... Jim Thomlinson "gramps" wrote: -- I have a worksheet that shows a weeks roster for 2 locations. What I would like to be able to do is to have 2 option buttons such that depending on the selection the print area would be set and the appropriate locations roster be printed. OptionbuttonSW would set the print area as A$2:$H$9 OptionbuttonMW would set the print area as $A$11:$H$27 Al |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Option Buttons/Radio Buttons | New Users to Excel | |||
Option Buttons | Excel Discussion (Misc queries) | |||
Option Buttons | Excel Discussion (Misc queries) | |||
Using 'Option Buttons' | Excel Discussion (Misc queries) | |||
Option Buttons | Excel Discussion (Misc queries) |