PDA

View Full Version : Auto run macro on file opening



Chuck31
12-12-2007, 01:29 PM
Hi,

is there a way to autorun a macro on file opening ?
if so, what's the vb code.

Regards,

debauch
12-12-2007, 01:46 PM
In the code view (right click a tab, "view code")
Then double-click on 'thisworkbook'
and put in following code :

Private Sub Workbook_Open()
Call macro_name
End Sub

Chuck31
12-12-2007, 01:51 PM
Thanks, is there a way by the same time to minimize or hide sheets in the workbook ?