A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Visual Basics code



 
 
Thread Tools Display Modes
  #1  
Old September 16th, 2003, 12:04 AM
Simran
external usenet poster
 
Posts: n/a
Default Visual Basics code

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.
  #2  
Old September 16th, 2003, 12:12 AM
Don Guillett
external usenet poster
 
Posts: n/a
Default Visual Basics code

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

"Simran" wrote in message
...
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.



  #3  
Old September 16th, 2003, 06:28 AM
Cliff Myers
external usenet poster
 
Posts: n/a
Default Visual Basics code

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

HTH
"Don Guillett" wrote in message
...
Post your macro code. Probably will have to be
for each ws in worksheets
printmacro here
next

"Simran" wrote in message
...
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.





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.