+ Reply to Thread
Results 1 to 5 of 5

Assign a macro to automatically find the last assigned other macro

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    Sacramento,CA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Assign a macro to automatically find the last assigned other macro

    I have a spreadsheat were macro1 is cast days. I want to assign another macro to make the cursor no matter where I am on the page move to the last time macro 1 was run.Any ideas?

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,964

    Re: Assign a macro to automatically find the last assigned other macro

    Add a new name to the workbook, say LastCell
    Make the last line in macro 1: ActiveWorkbook.Names.Item("LastCell").Value = ActiveCell.Address(0, 0)
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    08-01-2012
    Location
    Sacramento,CA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Assign a macro to automatically find the last assigned other macro

    I am not sure I follow. Here is my code, could you help alittle further?

    Please Login or Register  to view this content.
    Last edited by Cutter; 08-03-2012 at 05:30 PM. Reason: Added code tags

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Assign a macro to automatically find the last assigned other macro

    @ tperkins1973

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,964

    Re: Assign a macro to automatically find the last assigned other macro

    1. Did you create the Name? If you did not, copy the macro below to the workbook and run it ONE time.
    Please Login or Register  to view this content.
    To save the last cell used by CastDay, put the line below as the last line of the CastDay macro, not the first:
    Please Login or Register  to view this content.
    ...I want to assign another macro to make the cursor...move to the last time macro 1 [i.e., CastDay] was run...

    So, when you write the macro that's going to use that cell address add the below:
    Please Login or Register  to view this content.

+ 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