Discussion Locked

Excel 2000 - startup file

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hiya, our MD has noticed an error within Excel which I can't find anything to resolve this yet.

Hes openning a file in Excel which is able to view and run marcos which are in a Excel startup file. When he wants to open a second Excel document, the macros are viewable or executible. It looks like the second copy of Excel hasn't ran the XLStartup file.

Any ideas??

1 reply

by chitosunday

In xlstartup, your macro will run once you open excel. If you want it to activate when you open another file, use onwindow event to be put in your macro files in thisworkbook open event xlstartup file like this
Private Sub Workbook_WindowActivate(ByVal Wn As Excel.Window)
Application.OnWindow = "thisworkbook.yourmacroname"

This discussion is closed to new replies.