Re: Workbook_Open() will not run

From: Jack *** (mind-the-gap_at_DEEPblueyonder.co.uk)
Date: 12/08/04


Date: Wed, 8 Dec 2004 23:21:23 -0000

Thanks. Already thought of that, so I deleted all the code from the
Workbook_Open() except for a msgbox instruction - no dice. Put that one
line into Auto_Open() and it worked.

I wonder if it may be symptomatic of some workbook corruption and if it is
whether there is a quick way of filtering out corruptions of this nature.

-- 
Return email address is not as DEEP as it appears
"Paul B" <to_much_spam_to_list@nospam.com> wrote in message 
news:O8eCHsW3EHA.1408@TK2MSFTNGP10.phx.gbl...
> Jack, Don't know what you code looks like , may need to post the code and 
> see if somebody can see anything in it that could be causing this to 
> happen, maybe on error exit sub? What happens if you try a simple macro to 
> test it, like this
> Private Sub Workbook_Open()
> MsgBox "It Works!"
> End Sub
>
> -- 
> Paul B
> Always backup your data before trying something new
> Please post any response to the newsgroups so others can benefit from it
> Feedback on answers is always appreciated!
> Using Excel 2002 & 2003
>
> "Jack ***" <mind-the-gap@DEEPblueyonder.co.uk> wrote in message 
> news:uLj0GdW3EHA.3316@tk2msftngp13.phx.gbl...
>> Thanks.
>> I don't think that it is a sticky shift key, because I emailed the 
>> workbook from work to home and it displays the same problem.
>> At home I am using Office XP Pro 2002 SP2
>> I think it is the same version at the office.
>> The other macros work OK, so in principle the security settings permit 
>> macro execution (I get a warning message that it contains macros when I 
>> load the file, and I choose to "enable macros").
>> Also, I tried putting the code into an Auto_Open() macro in a general 
>> module and that seemed to run OK.  It just won't work from 
>> Workbook_Open() in the ThisWorkbook module.
>>
>> -- 
>> Return email address is not as DEEP as it appears
>> "Paul B" <to_much_spam_to_list@nospam.com> wrote in message 
>> news:uqZWbTW3EHA.4092@TK2MSFTNGP14.phx.gbl...
>>> Jack , it could also could be a sticking shift key, that will keep the 
>>> startup macro from running
>>> -- 
>>> Paul B
>>> Always backup your data before trying something new
>>> Please post any response to the newsgroups so others can benefit from it
>>> Feedback on answers is always appreciated!
>>> Using Excel 2002 & 2003
>>>
>>>
>>> "Paul B" <to_much_spam_to_list@nospam.com> wrote in message 
>>> news:u2PEgPW3EHA.2192@TK2MSFTNGP14.phx.gbl...
>>>> Jack, what version of excel are you using? If 2000 or above check tools 
>>>> macro security and see if it is set to high or very high
>>>> -- 
>>>> Paul B
>>>> Always backup your data before trying something new
>>>> Please post any response to the newsgroups so others can benefit from 
>>>> it
>>>> Feedback on answers is always appreciated!
>>>> Using Excel 2002 & 2003
>>>>
>>>> "Jack ***" <mind-the-gap@DEEPblueyonder.co.uk> wrote in message 
>>>> news:%23LWRiFW3EHA.2624@TK2MSFTNGP11.phx.gbl...
>>>>> Hi all
>>>>>
>>>>> After a bit of testing I am satisfied that the macro
>>>>> Private Sub Workbook_Open()
>>>>> that resides behind "ThisWorkbook"
>>>>> is not running at all when the workbook is opened.
>>>>>
>>>>> Any ideas how I should try to fix this? I tried running Rob Bovey's 
>>>>> code cleaner, and the project compiles ok without any errors.
>>>>>
>>>>> -- 
>>>>> Return email address is not as DEEP as it appears
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>