Visual Basics code

S

Simran

Hello,

I created a macro and button to print out every
worksheet on an excel workbook. However every time I add
a new worksheet I have to re-create the macro. How can I
set it to automatically print out every worksheet on the
workbook no matter how many I add in the future?

Thanks for any help.
 
D

Don Guillett

Post your macro code. Probably will have to be
for each ws in worksheets
printmacro here
next
 
C

Cliff Myers

You should just be able to change your code to:
Activeworkbook.PrintOut Copies:=1, Collate:=True or False your preference.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top