Web Development

General discussion

Locked

Excel Macro

By megan26 ·
I know how to create macros in Access. How do you create a print macro on a worksheet in Excel referencing another worksheet within the book? I can not get it to work.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by DKlippert In reply to Excel Macro

One of the easiest ways is to go to Tools>Macros
Record New Macro.
Walk through the steps and then turn the recorder off.
You'll find that what Access calls macros is not the same as macros in Word/Excel etc.
Access strings prewritten procedures to gether and call them Macros.
Other applications use VBA--what Access calls Modules.

Collapse -

by megan26 In reply to

Poster rated this answer.

Collapse -

by megan26 In reply to Excel Macro

what are the steps to do a print macro then? I have a button that I want it to select a certain worksheet and print that. I have gotten to the record a new macro but then I am lost from there.

Collapse -

by DKlippert In reply to Excel Macro

Sub PrintSheet2()
Sheets("Sheet2").Select
ActiveWindow.SelectedSheets.PrintOut
Sheets("Sheet1").Select
End Sub

Related Discussions

Related Forums