How do you write a macro to run automatically when opening an excel file? I
find no information in Excel Help, nor several excel/VBA textbooks from
library. This was exceptionally easy to do in Lotus 1-2-3 and seems to me to
be an essential tool.
Gord Dibben - 27 Oct 2004 01:18 GMT
Willy
You can use in a General Module
Sub Auto_Open()
your code or macroname
End Sub
Or in the ThisWorkbook module.
Sub WorkBook_Open()
your code or macroname
End Sub
Gord Dibben Excel MVP
>How do you write a macro to run automatically when opening an excel file? I
>find no information in Excel Help, nor several excel/VBA textbooks from
>library. This was exceptionally easy to do in Lotus 1-2-3 and seems to me to
>be an essential tool.