Control Buttons

Highlighted
Occasional Visitor

I am setting up control buttons for printing on a workbook that has multiple tabs. (worksheets on each tab). Is there a way to put all of the control buttons (used for printing different sheets) on one tab at the beginning of the workbook? Currently when I attempt to do this, it only prints the range on the tab that has the control buttons even though the Macro's that were created are on each of the separate tabs. The macro's work correctly but when they are linked to the control buttons they only print the range on the tab with the buttons.

1 Reply
Highlighted

If you use buttons from the Forms set you can do it like this:
- Add a list of worksheet names to the first worksheet
- Next to each one, insert a button from the Forms buttons and attach it to the following macro:

Sub PrintIt()
Worksheets(Activesheet.Buttons(Application.Caller).TopLeftCell.Offset(0, -1).Value).Activate
'Now here goes your printing code, I assume it is the same for each sheet
End Sub

The code above assumes the button is in a column immediately to the right of the column with sheet names. Make sure the top-left corner is within that cell.