Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Workbook_Open

The code in ThisWorkbook.Workbook_Open is not getting executed when the
workbook is opened. I put a Msgbox right at the top of the code and I never
see it.

InTHANKSAdvance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Workbook_Open

Hi
you have to put this code in your workbook module ('ThisWorkbook')

--
Regards
Frank Kabel
Frankfurt, Germany

"Jim Zeeb" schrieb im Newsbeitrag
...
The code in ThisWorkbook.Workbook_Open is not getting executed when

the
workbook is opened. I put a Msgbox right at the top of the code and

I never
see it.

InTHANKSAdvance


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Workbook_Open

Hi Jim,

One possibility is that EnableEvents has been set to false, perhaps by
interrrupted code operation.

In case this is the reason, run:

Sub Test()
Application.EnableEvents = True
End Sub

---
Regards,
Norman



"Jim Zeeb" wrote in message
...
The code in ThisWorkbook.Workbook_Open is not getting executed when the
workbook is opened. I put a Msgbox right at the top of the code and I
never
see it.

InTHANKSAdvance



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Workbook_Open

It is in ThisWorkbook

"Frank Kabel" wrote:

Hi
you have to put this code in your workbook module ('ThisWorkbook')

--
Regards
Frank Kabel
Frankfurt, Germany

"Jim Zeeb" schrieb im Newsbeitrag
...
The code in ThisWorkbook.Workbook_Open is not getting executed when

the
workbook is opened. I put a Msgbox right at the top of the code and

I never
see it.

InTHANKSAdvance



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Workbook_Open

Hiu
then post your complete code

--
Regards
Frank Kabel
Frankfurt, Germany

"Jim Zeeb" schrieb im Newsbeitrag
...
It is in ThisWorkbook

"Frank Kabel" wrote:

Hi
you have to put this code in your workbook module ('ThisWorkbook')

--
Regards
Frank Kabel
Frankfurt, Germany

"Jim Zeeb" schrieb im

Newsbeitrag
...
The code in ThisWorkbook.Workbook_Open is not getting executed

when
the
workbook is opened. I put a Msgbox right at the top of the code

and
I never
see it.

InTHANKSAdvance






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Workbook_Open

I do manipulate EnableEvents.
Does this persist between invocations of Excel?

"Norman Jones" wrote:

Hi Jim,

One possibility is that EnableEvents has been set to false, perhaps by
interrrupted code operation.

In case this is the reason, run:

Sub Test()
Application.EnableEvents = True
End Sub

---
Regards,
Norman



"Jim Zeeb" wrote in message
...
The code in ThisWorkbook.Workbook_Open is not getting executed when the
workbook is opened. I put a Msgbox right at the top of the code and I
never
see it.

InTHANKSAdvance




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Workbook_Open

Hi Jim,

Does this persist between invocations of Excel?


No, Events are enabled by default each time Excel is opened. So if your
Workbook_Open code is not firing after closing and re-opening Excel, my
guess was wrong. If, howver, Events are set to false and the workbook is
re-opened, the event code would not fire.

As Frank suggested, post your code. If the code is in the correct module
(ThisWorkbook) and events are set to true, the only remaining factor that I
can think of is the code itself.

---
Regards,
Norman



"Jim Zeeb" wrote in message
...
I do manipulate EnableEvents.
Does this persist between invocations of Excel?

"Norman Jones" wrote:

Hi Jim,

One possibility is that EnableEvents has been set to false, perhaps by
interrrupted code operation.

In case this is the reason, run:

Sub Test()
Application.EnableEvents = True
End Sub

---
Regards,
Norman



"Jim Zeeb" wrote in message
...
The code in ThisWorkbook.Workbook_Open is not getting executed when the
workbook is opened. I put a Msgbox right at the top of the code and I
never
see it.

InTHANKSAdvance






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Workbook_Open

Hi Jim,

One other thought, how are you opening the workbook?

---
Regards,
Norman



"Jim Zeeb" wrote in message
...
I do manipulate EnableEvents.
Does this persist between invocations of Excel?

"Norman Jones" wrote:

Hi Jim,

One possibility is that EnableEvents has been set to false, perhaps by
interrrupted code operation.

In case this is the reason, run:

Sub Test()
Application.EnableEvents = True
End Sub

---
Regards,
Norman



"Jim Zeeb" wrote in message
...
The code in ThisWorkbook.Workbook_Open is not getting executed when the
workbook is opened. I put a Msgbox right at the top of the code and I
never
see it.

InTHANKSAdvance






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Workbook_Open

And to piggyback on Norman's leading question...

If you're opening the workbook via a macro and use a shortcut key that includes
the Shift key, remove the shiftkey from the shortcut key combo.

Holding the Shiftkey down when you're opening a workbook stops the auto_open and
workbook_open code from running. And excel gets confused about your shiftkey in
the shortcut key combination.

Norman Jones wrote:

Hi Jim,

One other thought, how are you opening the workbook?

---
Regards,
Norman

"Jim Zeeb" wrote in message
...
I do manipulate EnableEvents.
Does this persist between invocations of Excel?

"Norman Jones" wrote:

Hi Jim,

One possibility is that EnableEvents has been set to false, perhaps by
interrrupted code operation.

In case this is the reason, run:

Sub Test()
Application.EnableEvents = True
End Sub

---
Regards,
Norman



"Jim Zeeb" wrote in message
...
The code in ThisWorkbook.Workbook_Open is not getting executed when the
workbook is opened. I put a Msgbox right at the top of the code and I
never
see it.

InTHANKSAdvance




--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook_Open () Bill Martin Excel Discussion (Misc queries) 12 December 20th 05 05:37 PM
workbook_open julio Excel Programming 4 September 26th 04 10:23 PM
Trouble with Workbook_Open() Silas Mercer Excel Programming 4 August 13th 04 03:13 PM
Workbook_Open Eric Marple Excel Programming 3 May 10th 04 01:24 AM
Help with Workbook_Open Ruan[_3_] Excel Programming 7 April 28th 04 07:52 AM


All times are GMT +1. The time now is 11:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"