+ Reply to Thread
Results 1 to 5 of 5

Workbook_Open event not firing for Excel2K

  1. #1
    John Keith
    Guest

    Workbook_Open event not firing for Excel2K

    I have a sheet originally developed with Excel2002 using the Auto_Open routine.
    I then found that I needed to make this project work with the older version.

    why wont this work?
    *** in ThisWorkbook's module ***
    Sub Worksheet_Open()
    Stop 'for test
    Auto_Open
    End Sub
    Sub WorkSheet_Close()
    Stop 'for test
    Auto_Close
    End Sub

    *** in a standard module ***
    Public Sub Auto_Open()
    ....

    Public Sus Auto_Close()
    ....

    I have put "stops" in the code to verify that the routines are never getting
    control.
    I am forced to first open Excel2000 then load the sheet because excel2002 is
    the version that is auto launched on dbl-click of a XLS file. (and the
    Auto_'s work perfectly in that version.)



    --
    Regards,
    John

  2. #2
    John Keith
    Guest

    RE: Workbook_Open event not firing for Excel2K

    thought i found the error of my ways.. But
    Sub Workbook_Open()
    Stop
    Auto_Open
    End Sub
    Sub Workbook_Close()
    Stop
    Auto_Close
    End Sub
    Doesn't work either...
    --
    Regards,
    John


    "John Keith" wrote:

    > I have a sheet originally developed with Excel2002 using the Auto_Open routine.
    > I then found that I needed to make this project work with the older version.
    >
    > why wont this work?
    > *** in ThisWorkbook's module ***
    > Sub Worksheet_Open()
    > Stop 'for test
    > Auto_Open
    > End Sub
    > Sub WorkSheet_Close()
    > Stop 'for test
    > Auto_Close
    > End Sub
    >
    > *** in a standard module ***
    > Public Sub Auto_Open()
    > ...
    >
    > Public Sus Auto_Close()
    > ...
    >
    > I have put "stops" in the code to verify that the routines are never getting
    > control.
    > I am forced to first open Excel2000 then load the sheet because excel2002 is
    > the version that is auto launched on dbl-click of a XLS file. (and the
    > Auto_'s work perfectly in that version.)
    >
    >
    >
    > --
    > Regards,
    > John


  3. #3
    Norman Jones
    Guest

    Re: Workbook_Open event not firing for Excel2K

    Hi John,

    > Sub Workbook_Close()


    There is no Workbook_Close event. This should be:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)

    What is your purpose in calling the ealier Auto_Open and Auto_Close instead
    of simply using the Workbook_Open and Workbook_beforeClose events?


    ---
    Regards,
    Norman



    "John Keith" <[email protected]> wrote in message
    news:[email protected]...
    > thought i found the error of my ways.. But
    > Sub Workbook_Open()
    > Stop
    > Auto_Open
    > End Sub
    > Sub Workbook_Close()
    > Stop
    > Auto_Close
    > End Sub
    > Doesn't work either...
    > --
    > Regards,
    > John
    >
    >
    > "John Keith" wrote:
    >
    >> I have a sheet originally developed with Excel2002 using the Auto_Open
    >> routine.
    >> I then found that I needed to make this project work with the older
    >> version.
    >>
    >> why wont this work?
    >> *** in ThisWorkbook's module ***
    >> Sub Worksheet_Open()
    >> Stop 'for test
    >> Auto_Open
    >> End Sub
    >> Sub WorkSheet_Close()
    >> Stop 'for test
    >> Auto_Close
    >> End Sub
    >>
    >> *** in a standard module ***
    >> Public Sub Auto_Open()
    >> ...
    >>
    >> Public Sus Auto_Close()
    >> ...
    >>
    >> I have put "stops" in the code to verify that the routines are never
    >> getting
    >> control.
    >> I am forced to first open Excel2000 then load the sheet because excel2002
    >> is
    >> the version that is auto launched on dbl-click of a XLS file. (and the
    >> Auto_'s work perfectly in that version.)
    >>
    >>
    >>
    >> --
    >> Regards,
    >> John




  4. #4
    John Keith
    Guest

    RE: Workbook_Open event not firing for Excel2K

    this helped...
    http://www.cpearson.com/excel/events.htm

    I then realized my macros where diabled too.
    Since my digital signature had been wiped from the project (i edited on a
    user's PC and forgot to re-attach it on my PC) Security setting HIGH was
    disabling macros from running.

    Now the events work fine.. and I dont need the ThisWorkbook modules
    (although the link above says I need to start using events instead of the
    Auto_open style)
    --
    Regards,
    John


    "John Keith" wrote:

    > I have a sheet originally developed with Excel2002 using the Auto_Open routine.
    > I then found that I needed to make this project work with the older version.
    >
    > why wont this work?
    > *** in ThisWorkbook's module ***
    > Sub Worksheet_Open()
    > Stop 'for test
    > Auto_Open
    > End Sub
    > Sub WorkSheet_Close()
    > Stop 'for test
    > Auto_Close
    > End Sub
    >
    > *** in a standard module ***
    > Public Sub Auto_Open()
    > ...
    >
    > Public Sus Auto_Close()
    > ...
    >
    > I have put "stops" in the code to verify that the routines are never getting
    > control.
    > I am forced to first open Excel2000 then load the sheet because excel2002 is
    > the version that is auto launched on dbl-click of a XLS file. (and the
    > Auto_'s work perfectly in that version.)
    >
    >
    >
    > --
    > Regards,
    > John


  5. #5
    John Keith
    Guest

    Re: Workbook_Open event not firing for Excel2K

    Hi Norman,

    I was using the Workbook_open and _close because I was mistakenly on the
    path that excel2003 supported the Auto_open _close style and that excel2000
    did not. After reading Chip's link page about events I discovered that I was
    wrong about that. My whole problem with the open event was that ALL my
    macros were disabled and I didnt realize it. So I took out the event code
    in ThisWorkbook's module and I am using the older style in my application
    now. Old habits die hard!

    What advantages have you found to using the Event routines as opposed to the
    Auto_ type routines?

    --
    Regards,
    John


    "Norman Jones" wrote:

    > Hi John,
    >
    > > Sub Workbook_Close()

    >
    > There is no Workbook_Close event. This should be:
    >
    > Private Sub Workbook_BeforeClose(Cancel As Boolean)
    >
    > What is your purpose in calling the ealier Auto_Open and Auto_Close instead
    > of simply using the Workbook_Open and Workbook_beforeClose events?
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "John Keith" <[email protected]> wrote in message
    > news:[email protected]...
    > > thought i found the error of my ways.. But
    > > Sub Workbook_Open()
    > > Stop
    > > Auto_Open
    > > End Sub
    > > Sub Workbook_Close()
    > > Stop
    > > Auto_Close
    > > End Sub
    > > Doesn't work either...
    > > --
    > > Regards,
    > > John
    > >
    > >
    > > "John Keith" wrote:
    > >
    > >> I have a sheet originally developed with Excel2002 using the Auto_Open
    > >> routine.
    > >> I then found that I needed to make this project work with the older
    > >> version.
    > >>
    > >> why wont this work?
    > >> *** in ThisWorkbook's module ***
    > >> Sub Worksheet_Open()
    > >> Stop 'for test
    > >> Auto_Open
    > >> End Sub
    > >> Sub WorkSheet_Close()
    > >> Stop 'for test
    > >> Auto_Close
    > >> End Sub
    > >>
    > >> *** in a standard module ***
    > >> Public Sub Auto_Open()
    > >> ...
    > >>
    > >> Public Sus Auto_Close()
    > >> ...
    > >>
    > >> I have put "stops" in the code to verify that the routines are never
    > >> getting
    > >> control.
    > >> I am forced to first open Excel2000 then load the sheet because excel2002
    > >> is
    > >> the version that is auto launched on dbl-click of a XLS file. (and the
    > >> Auto_'s work perfectly in that version.)
    > >>
    > >>
    > >>
    > >> --
    > >> Regards,
    > >> John

    >
    >
    >


+ Reply to Thread

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