Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Workbook Open/BeforeClose Problem

I cannot get my Workbook_Open() or Workbook_BeforeClose() macros to run when
the workbook is opened. The macros work fine in any other workbooks, just
not this one ... Any ideas?

Using XL 2003
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Workbook Open/BeforeClose Problem

Hi Ozzy,

Perhaps Events have been turned off.

Goto the VBE (Alt-F11)
Select the Immediate window (Ctrl-G)
Type: Application.EnableEvents = True
Hit Enter
Try re-loading the problematic file.

If the problem subsists, post your code.

---
Regards,
Norman



"Ozzy" wrote in message
...
I cannot get my Workbook_Open() or Workbook_BeforeClose() macros to run
when
the workbook is opened. The macros work fine in any other workbooks, just
not this one ... Any ideas?

Using XL 2003



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Workbook Open/BeforeClose Problem

Good idea Norman, tried it but to no effect. The code is not the problem, I
have replaced it with a simple message box pop-up but it still does not
work.. The code works fine when it is run directly after the workbook is open.

Cheers, Ozzy

"Norman Jones" wrote:

Hi Ozzy,

Perhaps Events have been turned off.

Goto the VBE (Alt-F11)
Select the Immediate window (Ctrl-G)
Type: Application.EnableEvents = True
Hit Enter
Try re-loading the problematic file.

If the problem subsists, post your code.

---
Regards,
Norman



"Ozzy" wrote in message
...
I cannot get my Workbook_Open() or Workbook_BeforeClose() macros to run
when
the workbook is opened. The macros work fine in any other workbooks, just
not this one ... Any ideas?

Using XL 2003




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Workbook Open/BeforeClose Problem

You do have those procedures in the ThisWorkbook module, right?

Ozzy wrote:

Good idea Norman, tried it but to no effect. The code is not the problem, I
have replaced it with a simple message box pop-up but it still does not
work.. The code works fine when it is run directly after the workbook is open.

Cheers, Ozzy

"Norman Jones" wrote:

Hi Ozzy,

Perhaps Events have been turned off.

Goto the VBE (Alt-F11)
Select the Immediate window (Ctrl-G)
Type: Application.EnableEvents = True
Hit Enter
Try re-loading the problematic file.

If the problem subsists, post your code.

---
Regards,
Norman



"Ozzy" wrote in message
...
I cannot get my Workbook_Open() or Workbook_BeforeClose() macros to run
when
the workbook is opened. The macros work fine in any other workbooks, just
not this one ... Any ideas?

Using XL 2003





--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Workbook Open/BeforeClose Problem

I do Dave. I can get this functionality to work in any other workbook, but
just not this one !

Thanks, Ozzy

"Dave Peterson" wrote:

You do have those procedures in the ThisWorkbook module, right?

Ozzy wrote:

Good idea Norman, tried it but to no effect. The code is not the problem, I
have replaced it with a simple message box pop-up but it still does not
work.. The code works fine when it is run directly after the workbook is open.

Cheers, Ozzy

"Norman Jones" wrote:

Hi Ozzy,

Perhaps Events have been turned off.

Goto the VBE (Alt-F11)
Select the Immediate window (Ctrl-G)
Type: Application.EnableEvents = True
Hit Enter
Try re-loading the problematic file.

If the problem subsists, post your code.

---
Regards,
Norman



"Ozzy" wrote in message
...
I cannot get my Workbook_Open() or Workbook_BeforeClose() macros to run
when
the workbook is opened. The macros work fine in any other workbooks, just
not this one ... Any ideas?

Using XL 2003




--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Workbook Open/BeforeClose Problem

How are you opening the file?

If you have a macro in one workbook that opens this second workbook and that
macro is started by a shortcut key, remove the shift from that shortcut key
combination.



Ozzy wrote:

I do Dave. I can get this functionality to work in any other workbook, but
just not this one !

Thanks, Ozzy

"Dave Peterson" wrote:

You do have those procedures in the ThisWorkbook module, right?

Ozzy wrote:

Good idea Norman, tried it but to no effect. The code is not the problem, I
have replaced it with a simple message box pop-up but it still does not
work.. The code works fine when it is run directly after the workbook is open.

Cheers, Ozzy

"Norman Jones" wrote:

Hi Ozzy,

Perhaps Events have been turned off.

Goto the VBE (Alt-F11)
Select the Immediate window (Ctrl-G)
Type: Application.EnableEvents = True
Hit Enter
Try re-loading the problematic file.

If the problem subsists, post your code.

---
Regards,
Norman



"Ozzy" wrote in message
...
I cannot get my Workbook_Open() or Workbook_BeforeClose() macros to run
when
the workbook is opened. The macros work fine in any other workbooks, just
not this one ... Any ideas?

Using XL 2003




--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Workbook Open/BeforeClose Problem

Hi Dave,

Just a simple file open, not called from another macro

"Dave Peterson" wrote:

How are you opening the file?

If you have a macro in one workbook that opens this second workbook and that
macro is started by a shortcut key, remove the shift from that shortcut key
combination.



Ozzy wrote:

I do Dave. I can get this functionality to work in any other workbook, but
just not this one !

Thanks, Ozzy

"Dave Peterson" wrote:

You do have those procedures in the ThisWorkbook module, right?

Ozzy wrote:

Good idea Norman, tried it but to no effect. The code is not the problem, I
have replaced it with a simple message box pop-up but it still does not
work.. The code works fine when it is run directly after the workbook is open.

Cheers, Ozzy

"Norman Jones" wrote:

Hi Ozzy,

Perhaps Events have been turned off.

Goto the VBE (Alt-F11)
Select the Immediate window (Ctrl-G)
Type: Application.EnableEvents = True
Hit Enter
Try re-loading the problematic file.

If the problem subsists, post your code.

---
Regards,
Norman



"Ozzy" wrote in message
...
I cannot get my Workbook_Open() or Workbook_BeforeClose() macros to run
when
the workbook is opened. The macros work fine in any other workbooks, just
not this one ... Any ideas?

Using XL 2003




--

Dave Peterson


--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Workbook Open/BeforeClose Problem

How about replacing your workbook_open with:

sub workbook_open()
call Continue_open
end sub

and put Continue_Open in a general module.

======
Or just try auto_Open and auto_close.

I don't have any more guesses why it doesn't work for you.

Well, a couple more...

Are events enabled when you open that workbook?
Do you enable macros when that workbook opens?

===
If you add a line like:
msgbox "hi from workbook_open"
right at the top, do you see that message box?

If yes, maybe it's something in your code later on.

Ozzy wrote:

Hi Dave,

Just a simple file open, not called from another macro

"Dave Peterson" wrote:

How are you opening the file?

If you have a macro in one workbook that opens this second workbook and that
macro is started by a shortcut key, remove the shift from that shortcut key
combination.



Ozzy wrote:

I do Dave. I can get this functionality to work in any other workbook, but
just not this one !

Thanks, Ozzy

"Dave Peterson" wrote:

You do have those procedures in the ThisWorkbook module, right?

Ozzy wrote:

Good idea Norman, tried it but to no effect. The code is not the problem, I
have replaced it with a simple message box pop-up but it still does not
work.. The code works fine when it is run directly after the workbook is open.

Cheers, Ozzy

"Norman Jones" wrote:

Hi Ozzy,

Perhaps Events have been turned off.

Goto the VBE (Alt-F11)
Select the Immediate window (Ctrl-G)
Type: Application.EnableEvents = True
Hit Enter
Try re-loading the problematic file.

If the problem subsists, post your code.

---
Regards,
Norman



"Ozzy" wrote in message
...
I cannot get my Workbook_Open() or Workbook_BeforeClose() macros to run
when
the workbook is opened. The macros work fine in any other workbooks, just
not this one ... Any ideas?

Using XL 2003




--

Dave Peterson


--

Dave Peterson


--

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
BeforeClose Problem [email protected] Excel Programming 1 October 6th 05 02:15 PM
problem with beforeclose event Gordon Excel Programming 1 September 30th 04 11:21 PM
Workbook BeforeClose Bug John Camburn Excel Programming 0 July 9th 04 09:29 PM
How to keep spreadsheet open in the BeforeClose event Wellie[_2_] Excel Programming 3 February 29th 04 09:03 PM
Excel - BeforeClose Problem... Al Mackay Excel Programming 0 September 22nd 03 12:26 PM


All times are GMT +1. The time now is 10:56 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"