+ Reply to Thread
Results 1 to 3 of 3

Msgbox

  1. #1
    Forum Contributor
    Join Date
    11-24-2008
    Location
    leicester
    MS-Off Ver
    Microsoft 365
    Posts
    161

    Msgbox

    Hi,

    Before running a macro that creates some stats i would like to able to insert a pop up msg box to remind user to check for xyz

    Any ideas?

    Thanks

    Antony

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Msgbox

    Hello Antony,

    This will pop up a dialog that will pause the macro until the user clicks the "OK" button.
    Please Login or Register  to view this content.
    Sincerely,
    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 Contributor
    Join Date
    04-16-2009
    Location
    Dorset, UK
    MS-Off Ver
    Office 2003, Office 2007
    Posts
    131

    Re: Msgbox

    The message box will prevent your users editing the worksheet. If you want them to check things and possibly change them then you need to allow them to leave the message box without running the rest of the macro. Try something like:
    Please Login or Register  to view this content.
    The parameter vbYesNo+vbDefaultButton2 means your message box will have two buttons labelled Yes and No, and that the default option will be button 2 (No). This can be changed to other button names (eg OK and Cancel) and the default button can be changed. Look through the options you're given when entering this part of the code to find the best combination for you. Don't forget that changing the buttons used will affect the test for what the message box returns.

    The second message box will have just an OK button as this is the default and I have left it unspecified.
    Last edited by Kafrin; 07-27-2009 at 05:22 AM.

+ 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