Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Utah, USA
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run macros automaticly (Office 2000)

    In Word 2000 a field can be set up to run a macro on entry or exit. Is it possible to do this in Excel?

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Run macros automaticly (Office 2000)

    Yes (depending on what you mean by "field"). Search this forum for the respective Workbook_Open and Workbook_BeforeClose Events.
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run macros automaticly (Office 2000)

    There are no fields in Excel, so it depends on what you really want to do. You can use the Worksheet_SelectionChange event routine to execute a VBA routine whenever the cell selection on a workksheet changes. In that VBA routine, you can see if the Target selection includes a particular cell. This can cause code to execute when a particular cell (field?) is selected.
    Legare Coleman

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run macros automaticly (Office 2000)

    After inserting an object from the control toolbox, one can rightclick the object and choose view code. At the top of the module window one can then select the objects name in the left dropdown and find the events associated with it in the righthand dropdown.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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