+ Reply to Thread
Results 1 to 6 of 6

i want my macro to run automatically instead of via shortcut key

  1. #1
    Registered User
    Join Date
    10-25-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    79

    i want my macro to run automatically instead of via shortcut key

    hello, can someone re-write/add to my code to make it run automatically when any cell is changed/updated? all the cells in the range update automatically from other workbooks.

    Please Login or Register  to view this content.
    Last edited by hopefulhart; 10-26-2013 at 04:12 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: i want my macro to run automatically instead of via shortcut key

    Hi, hopefulhart,

    before we would be able to help you with your request you would need to add code-tags to the procedure as required by Forum Rule #3.

    And you should make clear if the update is done via Formulas (Calculate) or Queries (Change).

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    10-25-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: i want my macro to run automatically instead of via shortcut key

    sorry about that...newbie.
    anyways, all the cells are updated via formulas, i dont manually change any of the cells that my macro covers. i figured out how to get my macro to fire when i manually change cell values but i dont do that, they are all updated automatically and i havent had success getting it to work

    thanks

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: i want my macro to run automatically instead of via shortcut key

    Hi, hopefulhart,

    if you will not refer to teh cells or sorting of that particular workhsset you could use the Worksheet_Activate-event to trigger the sorting when you switch to that particular sheet. Right click on the worksheet Tab, choose View Code and insert the following code in there (Sheet should be "Skaters"):
    Please Login or Register  to view this content.
    I placed your macor in a standard module. Please mind that you would to specify the module name if you have more than one macro of the same name in various standrad modules.

    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    10-25-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: i want my macro to run automatically instead of via shortcut key

    ok so i put your code where you said to, but nothing when i switch to that workbook. my macro is located in my personal workbook. what did you mean by put it in a standard module?

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: i want my macro to run automatically instead of via shortcut key

    Hi, hopefulhart,

    my macro is located in my personal workbook.
    You should have posted that earlier on because at least I assume that the macro was located in the workbook in question.

    Please Login or Register  to view this content.
    You would need to alter the name of the personal workbook if you still use personl.xls.

    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro that automatically sorts by date without pressing a shortcut
    By bellfellas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2013, 01:24 PM
  2. Replies: 4
    Last Post: 07-15-2013, 02:43 AM
  3. Macro Shortcut Key
    By MWSoccer18 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2013, 02:12 PM
  4. Shortcut key to VB macro
    By Joe in forum Excel General
    Replies: 4
    Last Post: 12-30-2005, 09:50 AM
  5. Macro shortcutsWhen you are assigning a keyboard shortcut to a macro?
    By JudithJubilee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2005, 04:06 AM

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