+ Reply to Thread
Results 1 to 3 of 3

create macro relative to button location

  1. #1
    Registered User
    Join Date
    Chicago, IL
    MS-Off Ver
    MS Office 2010

    create macro relative to button location

    Hi everyone,

    I have already created a macro that works perfectly relative to the selected cell. I want to create a column of buttons that will run the macro relative to that individual button when clicked (rather than creating 1000 macros).

    Is there a way that I could make the active cell change to wherever the button is so that it will run the macro with the correct references when the button is clicked? This is just an idea, but if someone has any solution to solve this problem it would be greatly appreciated.

    Thank you in advance!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010

    Re: create macro relative to button location

    Hello edgonzo101,

    Welcome to the Forum!

    There are many ways to use buttons and it would help to see your work. Please post your workbook and include some before and after examples along with any notes about what you are doing.

    To Attach a File:
    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.

    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010

    Re: create macro relative to button location

    Hi edgonzo101,

    With R as a variant:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread


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