+ Reply to Thread
Results 1 to 7 of 7

Add a message box before running a macro

  1. #1
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Add a message box before running a macro

    Hi! I need to add a message box before you can run the macro. It is going to ask the name of the person who runs the macro. When a person writes the name this name is going to be exported to a cell C1 in Sheet "Rapport". How can I create this one?

    Thank you very much.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,096

    Re: Add a message box before running a macro

    This will ask for a name and then enter that name in C1 of sheet "Rapport". Is this what you wanted?
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,891

    Re: Add a message box before running a macro

    Try something like:

    Please Login or Register  to view this content.
    PS. name is so often used as property of several objects, that it is better to avoid using it as your variable name.
    Best Regards,

    Kaper

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    8,057

    Re: Add a message box before running a macro

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Add a message box before running a macro

    This worked very well, thank you. The only thing is that my macro creates a report from Excel to Word. I want that when you run the macro, enter your name, then create the report with the name inserted in the report. Now its in the wrong order. Now it first creates the report then the name goes into cell C1.

    whole code:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Add a message box before running a macro

    I managed to fix it! I just changed the order inside of the code

  7. #7
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Add a message box before running a macro

    Thank you very much for the help guys.

+ 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. Display a message while a macro is running
    By vbace2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-26-2015, 09:13 AM
  2. [SOLVED] Message box after running the macro
    By Nikhil V V in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-17-2014, 02:54 AM
  3. Macro to show please wait message during macro is running
    By mido609 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2014, 04:02 PM
  4. Message box to appear while macro is running
    By gryffin13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 02:48 PM
  5. Macro message yet no macros running....
    By Steve-B in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2008, 09:36 AM

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