ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto macro (https://www.excelbanter.com/excel-programming/315916-auto-macro.html)

BDavis

Auto macro
 
Hey,

I using a bit of simple code stored as a module to creat
headers based on cell values. This is fine but it there a
way to store the code so that it runs itself inthe
backgraound with out me having to manually execute the
macro?

Paul B

Auto macro
 
BDavis, you could put it in the before print code in thisworkbook code, like
this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
'your code here
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003

"BDavis" wrote in message
...
Hey,

I using a bit of simple code stored as a module to creat
headers based on cell values. This is fine but it there a
way to store the code so that it runs itself inthe
backgraound with out me having to manually execute the
macro?





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com