+ Reply to Thread
Results 1 to 4 of 4

Can I control Macro run automatically current worksheet?

  1. #1
    Microlong
    Guest

    Can I control Macro run automatically current worksheet?

    I run a Macro in Excel 2003 with VBA, I want to run this Macro the current
    worksheet, not other worksheet, even if others worksheet is opening. Can
    anyone know how to control this macro run automatically appointed worksheet?
    --
    Developer
    QA Dashboard
    Microsoft China Development Centre

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Microlong

    more details required

    What is the trigger for running the macro

    Paste some of your code so that we can see how you structure your code.

    Is this to be run over just one sheet in one workbook

  3. #3
    gocush
    Guest

    RE: Can I control Macro run automatically current worksheet?

    you could start you macro by activating the sheet you want ...or..

    With Sheets("MySheet")
    your code
    End with

    "Microlong" wrote:

    > I run a Macro in Excel 2003 with VBA, I want to run this Macro the current
    > worksheet, not other worksheet, even if others worksheet is opening. Can
    > anyone know how to control this macro run automatically appointed worksheet?
    > --
    > Developer
    > QA Dashboard
    > Microsoft China Development Centre


  4. #4
    Tom Ogilvy
    Guest

    Re: Can I control Macro run automatically current worksheet?

    Instead of references to a specific sheet,
    Use Activesheet to refer to the sheet. Use ActiveWorkbook to refer to
    workbook containing the currently active sheet.

    --
    Regards,
    Tom Ogilvy

    "Microlong" <Microlong@email.com> wrote in message
    news:6B6B56FD-8985-471D-ABE2-25828E448319@microsoft.com...
    > I run a Macro in Excel 2003 with VBA, I want to run this Macro the current
    > worksheet, not other worksheet, even if others worksheet is opening. Can
    > anyone know how to control this macro run automatically appointed

    worksheet?
    > --
    > Developer
    > QA Dashboard
    > Microsoft China Development Centre




+ 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