+ Reply to Thread
Results 1 to 7 of 7

Workbook and Worksheet Events

  1. #1
    Chaplain Doug
    Guest

    Workbook and Worksheet Events

    Excel 2002-2003. What events may be trapped in VBA for an Excel workbook and
    its worksheets? For instance, I have an event routine:

    Private Sub Workbook_Open()

    Which runs when the workbook is opened. That is the only event I know the
    name of. Are there events for when I change from sheet to sheet? Are there
    events when a particular sheet is activated (selected)? Also, I am trying to
    set up a menu with control buttons, etc. I want to hide the cursor (box) so
    that I do not have a black box outline show up on the page. I use
    Sheets(<sheetname>).ScrollArea="E7" to hide the "cursor" behind a control.
    Is there a better way to do this? Thanks for the help.
    --
    Dr. Doug Pruiett
    Good News Jail & Prison Ministry
    www.goodnewsjail.org

  2. #2
    Bob Phillips
    Guest

    Re: Workbook and Worksheet Events

    Doug,

    Go into a worksheet module, select Worksheet from the left dropdown and all
    events associated with it will show in the right dropdown.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Chaplain Doug" <ChaplainDoug@discussions.microsoft.com> wrote in message
    news:C038C42A-86AE-4E10-A784-E26E3474DEAA@microsoft.com...
    > Excel 2002-2003. What events may be trapped in VBA for an Excel workbook

    and
    > its worksheets? For instance, I have an event routine:
    >
    > Private Sub Workbook_Open()
    >
    > Which runs when the workbook is opened. That is the only event I know the
    > name of. Are there events for when I change from sheet to sheet? Are

    there
    > events when a particular sheet is activated (selected)? Also, I am trying

    to
    > set up a menu with control buttons, etc. I want to hide the cursor (box)

    so
    > that I do not have a black box outline show up on the page. I use
    > Sheets(<sheetname>).ScrollArea="E7" to hide the "cursor" behind a control.
    > Is there a better way to do this? Thanks for the help.
    > --
    > Dr. Doug Pruiett
    > Good News Jail & Prison Ministry
    > www.goodnewsjail.org




  3. #3
    Don Guillett
    Guest

    Re: Workbook and Worksheet Events

    Have you looked within the controls.
    sheet tab>view code>left window>worksheet>right window see events

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    "Chaplain Doug" <ChaplainDoug@discussions.microsoft.com> wrote in message
    news:C038C42A-86AE-4E10-A784-E26E3474DEAA@microsoft.com...
    > Excel 2002-2003. What events may be trapped in VBA for an Excel workbook

    and
    > its worksheets? For instance, I have an event routine:
    >
    > Private Sub Workbook_Open()
    >
    > Which runs when the workbook is opened. That is the only event I know the
    > name of. Are there events for when I change from sheet to sheet? Are

    there
    > events when a particular sheet is activated (selected)? Also, I am trying

    to
    > set up a menu with control buttons, etc. I want to hide the cursor (box)

    so
    > that I do not have a black box outline show up on the page. I use
    > Sheets(<sheetname>).ScrollArea="E7" to hide the "cursor" behind a control.
    > Is there a better way to do this? Thanks for the help.
    > --
    > Dr. Doug Pruiett
    > Good News Jail & Prison Ministry
    > www.goodnewsjail.org




  4. #4
    Chaplain Doug
    Guest

    Re: Workbook and Worksheet Events

    Dear Bob:

    Your answer was just like showing the baby how to get his own milk and fill
    his own bottle. I'm gonna be real dangerous with this new found power! God
    bless and thanks.

    "Bob Phillips" wrote:

    > Doug,
    >
    > Go into a worksheet module, select Worksheet from the left dropdown and all
    > events associated with it will show in the right dropdown.
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Chaplain Doug" <ChaplainDoug@discussions.microsoft.com> wrote in message
    > news:C038C42A-86AE-4E10-A784-E26E3474DEAA@microsoft.com...
    > > Excel 2002-2003. What events may be trapped in VBA for an Excel workbook

    > and
    > > its worksheets? For instance, I have an event routine:
    > >
    > > Private Sub Workbook_Open()
    > >
    > > Which runs when the workbook is opened. That is the only event I know the
    > > name of. Are there events for when I change from sheet to sheet? Are

    > there
    > > events when a particular sheet is activated (selected)? Also, I am trying

    > to
    > > set up a menu with control buttons, etc. I want to hide the cursor (box)

    > so
    > > that I do not have a black box outline show up on the page. I use
    > > Sheets(<sheetname>).ScrollArea="E7" to hide the "cursor" behind a control.
    > > Is there a better way to do this? Thanks for the help.
    > > --
    > > Dr. Doug Pruiett
    > > Good News Jail & Prison Ministry
    > > www.goodnewsjail.org

    >
    >
    >


  5. #5
    Chaplain Doug
    Guest

    Re: Workbook and Worksheet Events

    Dear Don:

    Its just like I told Bob: I have been doing VBA programming (hacking) for
    quite some time now and had NEVER used this feature. I feel like the guy who
    was struggling for hours to cut down a tree with a chainsaw, and who had
    someone come up and start the chainsaw for the first time. I've been cutting
    without ever starting the chainsaw! And I ain't no dumb hillbilly neither.
    Well I do live in the hills and some people call me "Billy," but other than
    that . . . Thanks and God bless.

    "Don Guillett" wrote:

    > Have you looked within the controls.
    > sheet tab>view code>left window>worksheet>right window see events
    >
    > --
    > Don Guillett
    > SalesAid Software
    > donaldb@281.com
    > "Chaplain Doug" <ChaplainDoug@discussions.microsoft.com> wrote in message
    > news:C038C42A-86AE-4E10-A784-E26E3474DEAA@microsoft.com...
    > > Excel 2002-2003. What events may be trapped in VBA for an Excel workbook

    > and
    > > its worksheets? For instance, I have an event routine:
    > >
    > > Private Sub Workbook_Open()
    > >
    > > Which runs when the workbook is opened. That is the only event I know the
    > > name of. Are there events for when I change from sheet to sheet? Are

    > there
    > > events when a particular sheet is activated (selected)? Also, I am trying

    > to
    > > set up a menu with control buttons, etc. I want to hide the cursor (box)

    > so
    > > that I do not have a black box outline show up on the page. I use
    > > Sheets(<sheetname>).ScrollArea="E7" to hide the "cursor" behind a control.
    > > Is there a better way to do this? Thanks for the help.
    > > --
    > > Dr. Doug Pruiett
    > > Good News Jail & Prison Ministry
    > > www.goodnewsjail.org

    >
    >
    >


  6. #6
    Bob Phillips
    Guest

    Re: Workbook and Worksheet Events

    A hungry baby, with a bottle and a cow ... beware :-)

    The same feature can be found in ThisWorkbook, with the Workbook object, in
    userforms with any of the controls included, and with classes. Beware the
    power :-)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Chaplain Doug" <ChaplainDoug@discussions.microsoft.com> wrote in message
    news:4E79E38E-FB4A-43DC-8D2C-336059F22A08@microsoft.com...
    > Dear Bob:
    >
    > Your answer was just like showing the baby how to get his own milk and

    fill
    > his own bottle. I'm gonna be real dangerous with this new found power!

    God
    > bless and thanks.
    >
    > "Bob Phillips" wrote:
    >
    > > Doug,
    > >
    > > Go into a worksheet module, select Worksheet from the left dropdown and

    all
    > > events associated with it will show in the right dropdown.
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "Chaplain Doug" <ChaplainDoug@discussions.microsoft.com> wrote in

    message
    > > news:C038C42A-86AE-4E10-A784-E26E3474DEAA@microsoft.com...
    > > > Excel 2002-2003. What events may be trapped in VBA for an Excel

    workbook
    > > and
    > > > its worksheets? For instance, I have an event routine:
    > > >
    > > > Private Sub Workbook_Open()
    > > >
    > > > Which runs when the workbook is opened. That is the only event I know

    the
    > > > name of. Are there events for when I change from sheet to sheet? Are

    > > there
    > > > events when a particular sheet is activated (selected)? Also, I am

    trying
    > > to
    > > > set up a menu with control buttons, etc. I want to hide the cursor

    (box)
    > > so
    > > > that I do not have a black box outline show up on the page. I use
    > > > Sheets(<sheetname>).ScrollArea="E7" to hide the "cursor" behind a

    control.
    > > > Is there a better way to do this? Thanks for the help.
    > > > --
    > > > Dr. Doug Pruiett
    > > > Good News Jail & Prison Ministry
    > > > www.goodnewsjail.org

    > >
    > >
    > >




  7. #7
    Tom Ogilvy
    Guest

    Re: Workbook and Worksheet Events

    Also, see Chip Pearson's page on events
    http://www.cpearson.com/excel/events.htm

    --
    Regards,
    Tom Ogilvy

    "Chaplain Doug" <ChaplainDoug@discussions.microsoft.com> wrote in message
    news:2D493FEA-5C85-4273-BD42-DA4596198B2B@microsoft.com...
    > Dear Don:
    >
    > Its just like I told Bob: I have been doing VBA programming (hacking) for
    > quite some time now and had NEVER used this feature. I feel like the guy

    who
    > was struggling for hours to cut down a tree with a chainsaw, and who had
    > someone come up and start the chainsaw for the first time. I've been

    cutting
    > without ever starting the chainsaw! And I ain't no dumb hillbilly

    neither.
    > Well I do live in the hills and some people call me "Billy," but other

    than
    > that . . . Thanks and God bless.
    >
    > "Don Guillett" wrote:
    >
    > > Have you looked within the controls.
    > > sheet tab>view code>left window>worksheet>right window see events
    > >
    > > --
    > > Don Guillett
    > > SalesAid Software
    > > donaldb@281.com
    > > "Chaplain Doug" <ChaplainDoug@discussions.microsoft.com> wrote in

    message
    > > news:C038C42A-86AE-4E10-A784-E26E3474DEAA@microsoft.com...
    > > > Excel 2002-2003. What events may be trapped in VBA for an Excel

    workbook
    > > and
    > > > its worksheets? For instance, I have an event routine:
    > > >
    > > > Private Sub Workbook_Open()
    > > >
    > > > Which runs when the workbook is opened. That is the only event I know

    the
    > > > name of. Are there events for when I change from sheet to sheet? Are

    > > there
    > > > events when a particular sheet is activated (selected)? Also, I am

    trying
    > > to
    > > > set up a menu with control buttons, etc. I want to hide the cursor

    (box)
    > > so
    > > > that I do not have a black box outline show up on the page. I use
    > > > Sheets(<sheetname>).ScrollArea="E7" to hide the "cursor" behind a

    control.
    > > > Is there a better way to do this? Thanks for the help.
    > > > --
    > > > Dr. Doug Pruiett
    > > > Good News Jail & Prison Ministry
    > > > www.goodnewsjail.org

    > >
    > >
    > >




+ 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