+ Reply to Thread
Results 1 to 6 of 6

Message Box, Are you sure you meant to execute the macro?

  1. #1
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    452

    Message Box, Are you sure you meant to execute the macro?

    I have the following code that copies and pastes data. After the button is clicked and before the macro is executed I would like a message box to pop up with "Are you sure you mean to export as (text within Calculator!AJ2)" and a yes or no option.

    What is the appropriate lines of code to do that?

    Thank you much.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    Re: Message Box, Are you sure you meant to execute the macro?

    try this addition

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Message Box, Are you sure you meant to execute the macro?

    Attachment 706404

    I get a Compile error: User-defined type not defined, at the pictured line of code.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Message Box, Are you sure you meant to execute the macro?

    It should be
    Please Login or Register  to view this content.
    or get rid of the variable & just use
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Message Box, Are you sure you meant to execute the macro?

    It works, thank to both of you.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Message Box, Are you sure you meant to execute the macro?

    Glad to help & thanks for the feedback.

+ 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. Message Window to Execute Code
    By Rahul15292000 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-29-2019, 12:39 PM
  2. [SOLVED] Can't Execute Message Box
    By bralew in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-10-2017, 09:30 AM
  3. [SOLVED] Yes/No message box - If no execute code
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2016, 09:33 AM
  4. Execute a macro in a closed workbook, or open and execute without the user noticing
    By cearaujo123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2015, 06:44 PM
  5. Need macro to show information in a report only when critera are meant
    By superchew in forum Access Tables & Databases
    Replies: 7
    Last Post: 09-30-2014, 05:48 AM
  6. [SOLVED] Execute Macro on no response from message box
    By VillaLion in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2014, 12:10 PM
  7. Execute warning message
    By Pat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2006, 07:15 PM

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