+ Reply to Thread
Results 1 to 7 of 7

Msbox for runing or not runing a macro.

  1. #1
    Registered User
    Join Date
    06-15-2012
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    85

    Msbox for runing or not runing a macro.

    Hi VBA Experts!

    I use this code for coping and paste special in another sheet some ranges and also to print a speciffic area.

    Please Login or Register  to view this content.
    I'd like to add a new Msbox before the print Msbox(Bolding with red letters, in the above code), that will say

    "Are you sure"

    If the answer is yes, then proceed to the next step.

    If the answer is NO, then no procced and do nothing waiting for yes confirmation!

    Thanks in advance for any suggestion.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Msbox for runing or not runing a macro.

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-15-2012
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: Msbox for runing or not runing a macro.

    Thank you for your reply!

    Is any line in the code(that obviously i don't see-forgive me for this-) that add a new Msbox?

    Because i don't see this and of course the code gives me the same results as before. No new Msbox at all!

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Msbox for runing or not runing a macro.

    Hello apla,

    What stnkynts had given you, does indeed present you with a second message box, provided that you reply yes with the first message box.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  5. #5
    Registered User
    Join Date
    06-15-2012
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: Msbox for runing or not runing a macro.

    That's why you are a Guru. Thank you. This is good and i'll keep it in my code but i asked for something different!

    ..I'd like to add a new Msbox before the print Msbox(Bolding with red letters, in the above code), that will say

    "Are you sure"

    If the answer is yes, then proceed to the next step.

    If the answer is NO, then no procced and do nothing waiting for yes confirmation!
    In simple words i want to ask the user if is sure that wants to run the whole macro(copying-pasting to the other sheet)

    If choose yes then the next step is the Msbox asking for printing etc.... If the answer is NO, then the whole macro will not run.

    Can you help on this pls?

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Msbox for runing or not runing a macro.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-15-2012
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: Msbox for runing or not runing a macro.

    So simple when you know how to do this!

    Thank you very much!

+ 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. opening a VBA file and runing its macro
    By Zealotwraith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2013, 11:20 AM
  2. [SOLVED] runing macro depending on day
    By thesnake505 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-10-2013, 05:40 PM
  3. [SOLVED] Runing a macro when a new worksheet is created
    By arun_lp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2012, 11:20 PM
  4. Runing a macro on by changing a value of the cell
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-12-2008, 11:12 PM
  5. Runing part of the macro
    By michal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2005, 01:05 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