Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a file that contains code in the workbook open event.
I have been making periodic enhancements and am up to "version 18" of the app I am creating. The workbook open event stopped running when I open the file. I stripped out the code and just put a 'msgbox "text here..."' call in the event to just see if it fires off. It does not. All sheet_activate events still work. All macros run, including workbook_beforeclose, but not workbook_open. The workbook_open event still operates as expected in other workbooks, including "version 17", and un-related workbooks. I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Searched the KB, and this is NOT a workbook.open call. I am just double clicking on the file in windows explorer to start (and my shift key is not stuck down). Any suggestions would be appreciated greatly. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
steve - sometimes when debugging stuff you get to an
application.enableevents=false & then jump out of it before you get to application.enableevents=true when i start having weirdness like this, i do up a quickie subroutine: sub reset_everything() application.enableevents=true application.screenupdating=true application.calculation=xlmanual end sub and whatever else you generally turn off during subs. see if that helps. :) susan On Jun 19, 1:09 pm, Steve the large <Steve the wrote: I have a file that contains code in the workbook open event. I have been making periodic enhancements and am up to "version 18" of the app I am creating. The workbook open event stopped running when I open the file. I stripped out the code and just put a 'msgbox "text here..."' call in the event to just see if it fires off. It does not. All sheet_activate events still work. All macros run, including workbook_beforeclose, but not workbook_open. The workbook_open event still operates as expected in other workbooks, including "version 17", and un-related workbooks. I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Searched the KB, and this is NOT a workbook.open call. I am just double clicking on the file in windows explorer to start (and my shift key is not stuck down). Any suggestions would be appreciated greatly. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
obviously that should have been
application.calculation=xlautomatic duh susan On Jun 19, 1:09 pm, Steve the large <Steve the wrote: I have a file that contains code in the workbook open event. I have been making periodic enhancements and am up to "version 18" of the app I am creating. The workbook open event stopped running when I open the file. I stripped out the code and just put a 'msgbox "text here..."' call in the event to just see if it fires off. It does not. All sheet_activate events still work. All macros run, including workbook_beforeclose, but not workbook_open. The workbook_open event still operates as expected in other workbooks, including "version 17", and un-related workbooks. I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Searched the KB, and this is NOT a workbook.open call. I am just double clicking on the file in windows explorer to start (and my shift key is not stuck down). Any suggestions would be appreciated greatly. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Susan, thanks for the reply, I did try that, by putting the enableevents =
true in another routine. But my macro events are running along fine. Its just the workbook_open() routine that is causing the problem. It just stopped running in a single workbook. Other workbooks (previous versions, which I keep, and unrelated workbooks) still work perfectly fine. "Susan" wrote: obviously that should have been application.calculation=xlautomatic duh susan On Jun 19, 1:09 pm, Steve the large <Steve the wrote: I have a file that contains code in the workbook open event. I have been making periodic enhancements and am up to "version 18" of the app I am creating. The workbook open event stopped running when I open the file. I stripped out the code and just put a 'msgbox "text here..."' call in the event to just see if it fires off. It does not. All sheet_activate events still work. All macros run, including workbook_beforeclose, but not workbook_open. The workbook_open event still operates as expected in other workbooks, including "version 17", and un-related workbooks. I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Searched the KB, and this is NOT a workbook.open call. I am just double clicking on the file in windows explorer to start (and my shift key is not stuck down). Any suggestions would be appreciated greatly. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
actually, you said two workbookis:
I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Now you need to repeat this, but don't copy over everything. Copy over parts of the workbook until you find which part cause it to stop working. -- Regards, Tom Ogilvy "Steve the large" wrote: Susan, thanks for the reply, I did try that, by putting the enableevents = true in another routine. But my macro events are running along fine. Its just the workbook_open() routine that is causing the problem. It just stopped running in a single workbook. Other workbooks (previous versions, which I keep, and unrelated workbooks) still work perfectly fine. "Susan" wrote: obviously that should have been application.calculation=xlautomatic duh susan On Jun 19, 1:09 pm, Steve the large <Steve the wrote: I have a file that contains code in the workbook open event. I have been making periodic enhancements and am up to "version 18" of the app I am creating. The workbook open event stopped running when I open the file. I stripped out the code and just put a 'msgbox "text here..."' call in the event to just see if it fires off. It does not. All sheet_activate events still work. All macros run, including workbook_beforeclose, but not workbook_open. The workbook_open event still operates as expected in other workbooks, including "version 17", and un-related workbooks. I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Searched the KB, and this is NOT a workbook.open call. I am just double clicking on the file in windows explorer to start (and my shift key is not stuck down). Any suggestions would be appreciated greatly. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yeah, that's what I was thinking about. The process takes about an hour and
I was hoping I was doing something either stupid, obvious, or known. I can also just go back to the previous version and make the changes there, but there were a lot of changes and it doesn't tell me what went wrong. Thanks for the advice, I'll try it and get back to the thread. "Tom Ogilvy" wrote: actually, you said two workbookis: I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Now you need to repeat this, but don't copy over everything. Copy over parts of the workbook until you find which part cause it to stop working. -- Regards, Tom Ogilvy "Steve the large" wrote: Susan, thanks for the reply, I did try that, by putting the enableevents = true in another routine. But my macro events are running along fine. Its just the workbook_open() routine that is causing the problem. It just stopped running in a single workbook. Other workbooks (previous versions, which I keep, and unrelated workbooks) still work perfectly fine. "Susan" wrote: obviously that should have been application.calculation=xlautomatic duh susan On Jun 19, 1:09 pm, Steve the large <Steve the wrote: I have a file that contains code in the workbook open event. I have been making periodic enhancements and am up to "version 18" of the app I am creating. The workbook open event stopped running when I open the file. I stripped out the code and just put a 'msgbox "text here..."' call in the event to just see if it fires off. It does not. All sheet_activate events still work. All macros run, including workbook_beforeclose, but not workbook_open. The workbook_open event still operates as expected in other workbooks, including "version 17", and un-related workbooks. I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Searched the KB, and this is NOT a workbook.open call. I am just double clicking on the file in windows explorer to start (and my shift key is not stuck down). Any suggestions would be appreciated greatly. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Update -I can get workbook_open event to fire now, but it's a weird
interaction. I just finished copying over the code modules, names, forms, worksheets to a brand new file. Every so often I saved off a copy of the document and opened the new document with macros enabled. Each time I would see my message box text being from within Workbook_open. Until I did the very last thing.... I have four custom properties defined, they are "debug", "version", "userID", and "AutoSense". They are Y/N, Text, Text, Y/N. They are not linked to content. When I added these, my message stopped displaying. Note that there is no code running that interacts with these properties. The workbook_open() sub contains only a msgbox call. I went back to the original file, deleted all the custom properties, and the workbook_open() sub started running there, also. I added the custom properties back, (now named gDeb, gVer, gUser, gAS), workbook_open() stopped working again. I tried linking them to content in the workbook. This made no difference. At this point I am mightily confused, I have a work around (don't use custom properties) but I don't like it. Anyone have any thoughts? "Steve the large" wrote: Yeah, that's what I was thinking about. The process takes about an hour and I was hoping I was doing something either stupid, obvious, or known. I can also just go back to the previous version and make the changes there, but there were a lot of changes and it doesn't tell me what went wrong. Thanks for the advice, I'll try it and get back to the thread. "Tom Ogilvy" wrote: actually, you said two workbookis: I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Now you need to repeat this, but don't copy over everything. Copy over parts of the workbook until you find which part cause it to stop working. -- Regards, Tom Ogilvy "Steve the large" wrote: Susan, thanks for the reply, I did try that, by putting the enableevents = true in another routine. But my macro events are running along fine. Its just the workbook_open() routine that is causing the problem. It just stopped running in a single workbook. Other workbooks (previous versions, which I keep, and unrelated workbooks) still work perfectly fine. "Susan" wrote: obviously that should have been application.calculation=xlautomatic duh susan On Jun 19, 1:09 pm, Steve the large <Steve the wrote: I have a file that contains code in the workbook open event. I have been making periodic enhancements and am up to "version 18" of the app I am creating. The workbook open event stopped running when I open the file. I stripped out the code and just put a 'msgbox "text here..."' call in the event to just see if it fires off. It does not. All sheet_activate events still work. All macros run, including workbook_beforeclose, but not workbook_open. The workbook_open event still operates as expected in other workbooks, including "version 17", and un-related workbooks. I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Searched the KB, and this is NOT a workbook.open call. I am just double clicking on the file in windows explorer to start (and my shift key is not stuck down). Any suggestions would be appreciated greatly. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sounds like you might have Workbook_Open misspelled. (maybe an extra
underscore or something.) given it is in the ThisWorkbook module. -- regards, Tom Ogilvy "Steve the large" wrote: I have a file that contains code in the workbook open event. I have been making periodic enhancements and am up to "version 18" of the app I am creating. The workbook open event stopped running when I open the file. I stripped out the code and just put a 'msgbox "text here..."' call in the event to just see if it fires off. It does not. All sheet_activate events still work. All macros run, including workbook_beforeclose, but not workbook_open. The workbook_open event still operates as expected in other workbooks, including "version 17", and un-related workbooks. I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Searched the KB, and this is NOT a workbook.open call. I am just double clicking on the file in windows explorer to start (and my shift key is not stuck down). Any suggestions would be appreciated greatly. |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well...
One of the first things I did was to comment out my workbook_open() sub (which had been working in all versions before) so that there was no "workbook_open()" event. THEN, I allowed the vbe interface to create a new stub workbook open routine into which I put the messagebox code. Here is what my workbook_open routine looks like right now: Private Sub Workbook_Open() MsgBox prompt:="How now brown cow" End Sub Thanks for the thought, though. As I stated before, this routine was working right along until something slammed into it's facade. "Tom Ogilvy" wrote: sounds like you might have Workbook_Open misspelled. (maybe an extra underscore or something.) given it is in the ThisWorkbook module. -- regards, Tom Ogilvy "Steve the large" wrote: I have a file that contains code in the workbook open event. I have been making periodic enhancements and am up to "version 18" of the app I am creating. The workbook open event stopped running when I open the file. I stripped out the code and just put a 'msgbox "text here..."' call in the event to just see if it fires off. It does not. All sheet_activate events still work. All macros run, including workbook_beforeclose, but not workbook_open. The workbook_open event still operates as expected in other workbooks, including "version 17", and un-related workbooks. I created a brand new workbook, copied version 18's sheets, modules, forms, names and properties over, and the workbook_open still doesnt work. Searched the KB, and this is NOT a workbook.open call. I am just double clicking on the file in windows explorer to start (and my shift key is not stuck down). Any suggestions would be appreciated greatly. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find a Value the first Time It Occurs | Excel Worksheet Functions | |||
Determining row number in which a value occurs | Charts and Charting in Excel | |||
if number occurs twice | Excel Discussion (Misc queries) | |||
MsgBox when an Error occurs | Excel Discussion (Misc queries) | |||
How can I add up how often certain text occurs? | Excel Worksheet Functions |