+ Reply to Thread
Results 1 to 2 of 2

Get macro to run on next active cell

  1. #1
    Registered User
    Join Date
    02-26-2007
    Posts
    22

    Get macro to run on next active cell

    I have finally gotten this thing coded and Ive reached a snag. The code is looping and calling macros depending on values, but I need it to loop on the ending active cell of the macro it runs, and not the next cell down the A column.

    Sub SelectCase()
    Dim Last As Long
    Dim Rng As Range
    Last = Cells(Rows.Count, "A").End(xlUp).Row
    Set Rng = Range("A1:A487")
    For Each cell In Rng
    Select Case cell.Value

    Case 2
    Call macro2
    Case 3
    Call macro3
    ETC.....

    End Select
    Next Cell...........----> I need this to select the Case cell.value on the ending
    End Sub.....................active cell of the macro that was
    ................................run (macro2, macro3, etc)

    Any ideas on how to do this?

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Please read forum rules below. Duplicate posting and not wrapped code is not permitted.

    PM me if you agree to the rules and I will move this to your old post.

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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