+ Reply to Thread
Results 1 to 8 of 8

Input Box to End Macro

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Input Box to End Macro

    I want to write the VBA for an input box that reminds the user to do something. If the user selects "no" as their response, then I want it to end the macro. Here's the best I can do.

    Please Login or Register  to view this content.
    Obviously my code won't run. Any help?

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Input Box to End Macro

    As an example...

    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Try a message box and put the response in a variable.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Input Box to End Macro

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Input Box to End Macro

    This thread is like my hairline, gets thiner and thiner as times go by...

    I like it shg and thanks for the sharing...

  6. #6
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Input Box to End Macro

    Cool! It's amazing how many solutions there are to a problem. SHG and Norie's solutions worked perfectly. JeffreyBrown your VBA returned the following error message: "Wrong number of arguments or invalid property assignment". Any idea why this is?

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Input Box to End Macro

    No not really, although, maybe not worth figuring out as there are other flaws (in mine), plus shg and norie are the real VBA experts.

  8. #8
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Input Box to End Macro

    Cool. Well thanks for your help.

+ 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

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