Results 1 to 2 of 2

Are problems with the Workbook_BeforeClose due to my environment?

Threaded View

blobbles Are problems with the... 09-29-2012, 03:27 AM
TMS Re: Are problems with the... 09-29-2012, 01:48 PM
  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    63

    Are problems with the Workbook_BeforeClose due to my environment?

    Hi all,

    I am having constant problems with the Workbook_BeforeClose event in my workplace. Basically, the Workbook_BeforeClose doesn't allow me to do a whole host of things - Protect/Unprotect sheets, Application.DisplayAlerts = False, Thisworkbook.Save. With all of these, the code appears to run with each of them. However, none of them actually work. What I mean is that I have a piece of code that says "Worksheet("xxx").Protect Password", which runs fine, but it does not actually protect the worksheet, it remains Unprotected directly after this code runs (as I can see via the UI and subsequent bugs). The same behaviour occurs with the others.

    Now I can find numerous examples, like this: http://www.vbaexpress.com/kb/getarticle.php?kb_id=379 where all the things I want should actually work. But they don't. And I am wondering why?

    My workplace is using Excel 2003 (11.8169.8172) SP3. Its a very tightly controlled banking environment and as I have little actual say in hotfixes or upgrades etc its unlikely to change. My questions are:

    Has anyone had similar problems? If so, was it in Excel 2003? And if you fixed it, was it because of a hotfix?
    ....or maybe....
    Is this due to a corrupt file?

    My file reads and writes from/to databases before closing, which is why I really need this event to work properly.

    Thanks!
    Last edited by blobbles; 09-29-2012 at 03:31 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1