Results 1 to 1 of 1

Thread: Edit a macro to add user prompts

  1. #1

    Edit a macro to add user prompts



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi,

    This is may first post and I'm fairly new to macros & using VBA coding. I currently am using Excel 2010 and I created a macro that opens 2 different worksheets and then runs an "IF" statement to perform a VLookUP of multilpe columns and merges the two worksbooks into one.

    I assigned the macro to a Button (Form Control) and the macro works as desired. My problem is that the 2 worksheets currently in my macro have static names and the names will change each month when new worksheets are created with the next months data. In addition I don't know if the the "IF" statement will need to be modified each time the macro is run to reference the new worksheet names being used. I would still like to use a button to run the macro, but with the added prompts for the users.


    I have read that I could modifiy my macro using VBA to insert prompts for the user to choose the worksheets to open and also to prompt to change the name of the worksheet in the "IF" statement. I have no experience with VBA ( but hope to learn soon) and was wondering if anyone could show me how to create the prompts and add them to my macro?

    I have attached a workbook with tabs showing the 2 workbooks that open and need the macro to prompt the user to select a location and chose a workbook to open. The next tab shows the new final workbook after the macro has run and completed the VLookUp in the "IF" statement. The last tab is the macro itself with notes detailing where I need the user prompts to be inserted.

    I would appreciate it if someone can show me how to edit the macro to add the prompts in the appropriate locations. Or, let me know if there is an better way to accopmplish what I'm trying to do.

    Thanks in advance,

    gdoode23
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •