Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MsgBox working is Excel Macro Programming

I want a MsgBox when the macro starts with 2 buttons. If user presses OK
button, macro continues. If user presses Cancel button, macro ends. Can
someone please advise how to do the same.
--
Vikas Vadgama
Though worth Millions: Humanity is the biggest & the best religion. Live &
Let Live.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default MsgBox working is Excel Macro Programming

Hi,

You could use the below

Message = MsgBox("Do you want to continue?", vbOKCancel, "Continue?")
If Message = vbCancel Then End
''' If OK is selected code will run through

Alan

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200908/1

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default MsgBox working is Excel Macro Programming

Sub Macro()
If MsgBox("Do you want to continue?", vbOKCancel) < vbYes Then Exit Sub
'your code continues

End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Vikas Vadgama" wrote:

I want a MsgBox when the macro starts with 2 buttons. If user presses OK
button, macro continues. If user presses Cancel button, macro ends. Can
someone please advise how to do the same.
--
Vikas Vadgama
Though worth Millions: Humanity is the biggest & the best religion. Live &
Let Live.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Programming - Macro G&GSolutions[_2_] Excel Programming 3 October 29th 08 02:26 PM
MSGBOX not working Peter Rooney Excel Programming 3 July 11th 06 09:36 AM
Msgbox not working davegb Excel Programming 13 November 9th 05 09:46 PM
.XLT with user programming not working through Intranet. Steve Roberts Excel Programming 0 May 18th 05 10:41 PM
ComboBox programming not working DontKnowWhatImDoing Excel Programming 2 April 15th 04 02:43 PM


All times are GMT +1. The time now is 02:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"