Private Sub Workbook_Open()

  • Thread starter Thread starter LEB
  • Start date Start date
L

LEB

I have Excel 2002, and have a subroutine Private Sub
Workbook_Open() under the ThisWorkbook object in VBA. I
thought the procedure would run each time the workbook is
opened and the Open Event is triggered.

When I open Excel, and then open the workbook, the
procedure runs. However, if I close the workbook (leaving
Excel running) and then reopen the workbook, the sub
routine doen't run. Is this normal? If so, how do I make
this routine run without closing and reopening Excel and
the workbook?
 
Hi
this procedure should be invoked each time you open your workbook!. You
may post your code (maybe something creates an error in this procedure
or you have an IF clause within)
 
I've had the same thing happen to me at times...hmmm.

Try the event "Activate" (a workbook is activated) or "SheetActivate" (any
sheet is activated) in your code in the ThisWorkbook object. Not positive
because I haven't had the need to try them.
 
Tried the Activate event, with the same results. I don't
think there is a problem with my code, because I created
a new workbook, and added just MsgBox "Running" to the
Workbook Open event sub. Still didn't work as it should.
I'm going to explore the KnowledgeBase.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top