Results 1 to 5 of 5

Thread: Strange behavoiur of Workbook_Open() and Worksheet_Activate() events

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    15
    Rep Power
    0

    Strange behavoiur of Workbook_Open() and Worksheet_Activate() events

    I have a Workbook_Open() event on a workbook that maximises the application and window (i.e. the workbook).
    In the same workbook I have a Worksheet_Activate() event on the various worksheets that sets Zoom to 100% and resets the position of buttons/icons to where they should be.

    These events all work perfectly when I open the workbook from my computer or from Sharepoint, however they do not work when opening the workbook from our other UCM system (Oracle).

    It isn't a huge issue, really, but it is an annoyance that I could do without if possible. The reasons behind these events are to get around an issue we find occuring frequently where the workbook opens 'off-window' and cannot be seen without using the Arrange Panes option, and to make sure that the worksheets are legible.

    Has anyone else come across this issue and/or can suggest potential workarounds?

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    What is this UCM system? Does it have macro enabled?
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    15
    Rep Power
    0
    Oracle Content Server (Oracle Content Server). Unfortunately I only have user-level access so I cannot answer your other question. However, all of the other events (Worksheet_Change, On_Click, etc) work just fine regardless of where the workbook is opened from.

  4. #4
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    So you're saying on the Workbook_Open and _Activate events don't fire, but the other events work fine? Certainly strange. Did you try Auto_Open() in the module?
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  5. #5
    Junior Member
    Join Date
    Oct 2013
    Posts
    15
    Rep Power
    0
    Auto_Open(), which does not seem fully capable anyway (it doesn't recognise maximising the application window when recording), also does not run.

    For reference, here is the Workbook_Open() code:

    Code:
    Sub workbook_Open()
    
    'Always maximise the Excel window and workbook
    Application.WindowState = xlMaximized
    ActiveWindow.ActivateNext
    ActiveWindow.WindowState = xlMaximized
    
    End Sub
    I found that the Worksheet_Activate() code actually is firing - I just didn't notice because the Workbook_Open() was failing.

Similar Threads

  1. VBA Code to Generate Events at Specific frequency
    By ChiswickBridge in forum Excel Help
    Replies: 0
    Last Post: 02-11-2013, 08:20 AM
  2. Strange Excel Spinner Buttons Help??
    By stangirl87 in forum Excel Help
    Replies: 2
    Last Post: 10-08-2012, 07:31 AM
  3. Replies: 2
    Last Post: 04-03-2011, 08:25 PM

Posting Permissions

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