View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Macros that only run once

Hi tim

If you want to run the code automatic when you open the workbook
the first time than name the macro

Sub Auto_open()
'code or macro name
End Sub

Note : If you use a Auto_open macro then this wil not run if you open the file with a macro





--
Regards Ron de Bruin
http://www.rondebruin.nl



"Tim Payne" wrote in message ...
That's exactly what I was after! Using this I can have my spreadsheet run some one-time initial formatting and layout macros, and
then remove the macro so that it's not run on subsequent opens of the spreadsheet. Thanks for the advice!

:)

Tim.