+ Reply to Thread
Results 1 to 3 of 3

Use Application.Run from the active cell to loop through cell to run code

  1. #1
    Forum Contributor
    Join Date
    06-06-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    180

    Use Application.Run from the active cell to loop through cell to run code

    Hi There,

    I am trying to use the below code to run numerous macros in cell A8 downwards. So the first cell in A8 may have the value Rule8 and the code will run this rule and then move onto A9 and then run that rule. Any help greatly appreciated.


    Please Login or Register  to view this content.
    Kind regards,

    Forrestgump
    Last edited by forrestgump1980; 04-09-2014 at 09:49 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Use Application.Run from the active cell to loop through cell to run code

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Contributor
    Join Date
    06-06-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Use Application.Run from the active cell to loop through cell to run code

    Unbelievably I have managed to work out what I was trying to do, It was alot more simply than I originally thought:-


    Sub Loop1()
    'This loop runs until there is the next cell down is blank
    Range("A8").Select
    Do
    Application.Run (ActiveCell.Value)
    ActiveCell.Offset(1, 0).Select
    Loop Until IsEmpty(ActiveCell.Value)

    End Sub

+ 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] How to make a macro run for each cell in a loop for the active range
    By alrikvincent in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-01-2013, 11:33 AM
  2. Loop Until Active Cell is in a specific column?
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2013, 02:41 PM
  3. If cell is active (text in cell) print area (A1:?52) Please see code I think I am Close
    By Jeff up North in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2013, 06:27 PM
  4. [SOLVED] Imported Data; Loop through row until blank; offset each active cell to catergorize time
    By jerbaldw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2012, 11:15 AM
  5. [SOLVED] Macro Copy Active Cell to Range Name, loop
    By zigstick in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-27-2005, 03:06 PM

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