Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Aug 2001
    Liverpool, UK
    Thanked 0 Times in 0 Posts

    run code on Workbook Open (EN/Excel/2000)

    I want to use an application event to mangle input data: App_SheetChange does the trick.
    Excel help explains that you

    ====quote from VB help ===
    must connect the declared object in the class module with the Application object. You can do this with the following code from any module.

    Dim X As New EventClassModule

    Sub InitializeApp()
    Set X.App = Application
    End Sub
    === end quote===
    (where App is declared in a class module named EventClassModule as Public WithEvents App As Application)

    I need to get something to run InitializeApp() when I load the Workbook, so that my SheetChange code runs every time i open the sheet. Great, shall we use the App_WorkbookOpen event? Funny joke, it only works after InitializeApp() has been called. Chicken/Egg problem? There has to be a simple method to run some code on Workbook/Open!

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Dublin, Ireland, Republic of
    Thanked 0 Times in 0 Posts

    Re: run code on Workbook Open (EN/Excel/2000)

    Have a look at <post#=91613>post 91613</post#> and see if it helps. The Workbook_Open() is probably what you need.

    Andrew C

Posting Permissions

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