Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Application Event - Opening Workbook

Hi

I have for a long time been making good use of a utility file based on
Chip P's example of an Excel workbook that tracks Excel files being
opened and then undertakes certain activities for specific files.

After what I thought was just another routine editing session, I found
an error when starting the Excel session the following day. The VBE
was opened in step mode in the utility file at this point:

Private Sub App_WorkbookOpen(ByVal Wb As Excel.Workbook)

The utility is opened automatically by Excel from an alternate xlstart
directory

The file opens fine when taken out of the alternate xlstart directory
and opened manually.

Has anyone else had this or a similar problem?

Up to now I have rectified it by going back to an earlier copy and
trying to re-input the edits

Thanks

Tim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Application Event - Opening Workbook

I'm using xl2000. The syntax automatically generated by xl in this event is:

Private Sub Workbook_Open()

You might try making a copy of your file with this simplified version and
test it.

"Tim Childs" wrote:

Hi

I have for a long time been making good use of a utility file based on
Chip P's example of an Excel workbook that tracks Excel files being
opened and then undertakes certain activities for specific files.

After what I thought was just another routine editing session, I found
an error when starting the Excel session the following day. The VBE
was opened in step mode in the utility file at this point:

Private Sub App_WorkbookOpen(ByVal Wb As Excel.Workbook)

The utility is opened automatically by Excel from an alternate xlstart
directory

The file opens fine when taken out of the alternate xlstart directory
and opened manually.

Has anyone else had this or a similar problem?

Up to now I have rectified it by going back to an earlier copy and
trying to re-input the edits

Thanks

Tim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Application Event - Opening Workbook

Hi

I think the event you are referring to is the workbook containing the macro
being opened whereas the application level macro traps ALL workbooks being
opened - because it is at the Excel application level not the workbook
level.

Hope that is not gobbledygook!

Thanks

Tim


"gocush" /delete wrote in message
...
I'm using xl2000. The syntax automatically generated by xl in this event

is:

Private Sub Workbook_Open()

You might try making a copy of your file with this simplified version and
test it.

"Tim Childs" wrote:

Hi

I have for a long time been making good use of a utility file based on
Chip P's example of an Excel workbook that tracks Excel files being
opened and then undertakes certain activities for specific files.

After what I thought was just another routine editing session, I found
an error when starting the Excel session the following day. The VBE
was opened in step mode in the utility file at this point:

Private Sub App_WorkbookOpen(ByVal Wb As Excel.Workbook)

The utility is opened automatically by Excel from an alternate xlstart
directory

The file opens fine when taken out of the alternate xlstart directory
and opened manually.

Has anyone else had this or a similar problem?

Up to now I have rectified it by going back to an earlier copy and
trying to re-input the edits

Thanks

Tim



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Application Event - Opening Workbook

Yes, I was just wondering if you triggered the event at the workbook level it
might make some difference.
Okay the event you are using is in a Utility xls and is triggered when it
opens as well as when it opens other xls files. Is it possible, for instance
that of you workbooks might have some code like:
Application.EnableEvents=False
Some other code which crashed
Application.EnableEvents=True

Since Application.EnableEvents does not reset itself, this would
prevent you app_event from firing.
Just a guess....

"Tim Childs" wrote:

Hi

I think the event you are referring to is the workbook containing the macro
being opened whereas the application level macro traps ALL workbooks being
opened - because it is at the Excel application level not the workbook
level.

Hope that is not gobbledygook!

Thanks

Tim


"gocush" /delete wrote in message
...
I'm using xl2000. The syntax automatically generated by xl in this event

is:

Private Sub Workbook_Open()

You might try making a copy of your file with this simplified version and
test it.

"Tim Childs" wrote:

Hi

I have for a long time been making good use of a utility file based on
Chip P's example of an Excel workbook that tracks Excel files being
opened and then undertakes certain activities for specific files.

After what I thought was just another routine editing session, I found
an error when starting the Excel session the following day. The VBE
was opened in step mode in the utility file at this point:

Private Sub App_WorkbookOpen(ByVal Wb As Excel.Workbook)

The utility is opened automatically by Excel from an alternate xlstart
directory

The file opens fine when taken out of the alternate xlstart directory
and opened manually.

Has anyone else had this or a similar problem?

Up to now I have rectified it by going back to an earlier copy and
trying to re-input the edits

Thanks

Tim




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Application Event - Opening Workbook

Hi

thanks for that response

as faras I can tell tis is not happening as the procedure is stuck on the
first line as the Excel application is being opened

bw

Tim

"gocush" /delete wrote in message
...
Yes, I was just wondering if you triggered the event at the workbook level

it
might make some difference.
Okay the event you are using is in a Utility xls and is triggered when it
opens as well as when it opens other xls files. Is it possible, for

instance
that of you workbooks might have some code like:
Application.EnableEvents=False
Some other code which crashed
Application.EnableEvents=True

Since Application.EnableEvents does not reset itself, this would
prevent you app_event from firing.
Just a guess....





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
Launch Click Event Using Application.Run cellist Excel Discussion (Misc queries) 4 November 5th 09 12:46 AM
captcure close application event suru Excel Worksheet Functions 2 June 17th 09 07:10 AM
Application level event help John Bundy Excel Discussion (Misc queries) 2 January 15th 08 10:30 PM
Application.EnableEvents = true, but no event fires Wexler Excel Programming 0 October 19th 04 06:08 PM
Monitoring application-level event problem R Avery Excel Programming 2 January 6th 04 01:58 PM


All times are GMT +1. The time now is 10:29 AM.

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

About Us

"It's about Microsoft Excel"