Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default "If Yes then Proceed..." Macro

I need a simple Yes/No dialog box.
If the User clicks "Yes" it runs a macro that I have already recorded.
If "No" it closes the macro.

Is there a trusted public library of these types of basic macros somewhere?

Thanks so much.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default "If Yes then Proceed..." Macro

bman342 wrote:
I need a simple Yes/No dialog box.
If the User clicks "Yes" it runs a macro that I have already recorded.
If "No" it closes the macro.

Is there a trusted public library of these types of basic macros somewhere?

Thanks so much.



if MsgBox ("Message", vbYesNo) = vbYes then

.... macro

end if
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default "If Yes then Proceed..." Macro


bman342 wrote:
I need a simple Yes/No dialog box.
If the User clicks "Yes" it runs a macro that I have already recorded.
If "No" it closes the macro.

Is there a trusted public library of these types of basic macros somewhere?

Thanks so much.


Try This:

Msg = MsgBox("Your Question For User",vbYesNo,)
If Msg = vbNo Then Exist Sub
If Msg = vbYes Then Your Macro

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default "If Yes then Proceed..." Macro

Hi Bman342,

Try:

'=============
Public Sub Tester()
Dim res As VbMsgBoxResult

res = MsgBox(Prompt:="Do you wish to run the Macro?", _
Buttons:=vbYesNo + vbQuestion)

If res = vbNo Then Exit Sub

'Your code

End Sub
'<<=============


---
Regards,
Norman



"bman342" wrote in message
...
I need a simple Yes/No dialog box.
If the User clicks "Yes" it runs a macro that I have already recorded.
If "No" it closes the macro.

Is there a trusted public library of these types of basic macros
somewhere?

Thanks so much.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default "If Yes then Proceed..." Macro

dim vRep as Variant
vRep = Msgbox("Do you want to continue",vbYesNo)
if vRep = vbYes then
<do something
end if

HTH
--
AP

"bman342" a écrit dans le message de
news: ...
I need a simple Yes/No dialog box.
If the User clicks "Yes" it runs a macro that I have already recorded.
If "No" it closes the macro.

Is there a trusted public library of these types of basic macros
somewhere?

Thanks so much.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default "If Yes then Proceed..." Macro

Hi Bman342,

Alternatively, try:

'=============
Public Sub Tester()
Dim res As VbMsgBoxResult

res = MsgBox(Prompt:="Do you wish to run the Macro?", _
Buttons:=vbYesNo + vbQuestion)

If res = vbYes Then
Call myMacro
End If

End Sub
'<<=============


---
Regards,
Norman


"bman342" wrote in message
...
I need a simple Yes/No dialog box.
If the User clicks "Yes" it runs a macro that I have already recorded.
If "No" it closes the macro.

Is there a trusted public library of these types of basic macros
somewhere?

Thanks so much.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default "If Yes then Proceed..." Macro

Works fine. Much thanks to both.

"Norman Jones" wrote:

Hi Bman342,

Alternatively, try:

'=============
Public Sub Tester()
Dim res As VbMsgBoxResult

res = MsgBox(Prompt:="Do you wish to run the Macro?", _
Buttons:=vbYesNo + vbQuestion)

If res = vbYes Then
Call myMacro
End If

End Sub
'<<=============


---
Regards,
Norman


"bman342" wrote in message
...
I need a simple Yes/No dialog box.
If the User clicks "Yes" it runs a macro that I have already recorded.
If "No" it closes the macro.

Is there a trusted public library of these types of basic macros
somewhere?

Thanks so much.




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 - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Excel Discussion (Misc queries) 0 July 17th 06 02:38 PM
"Clean Me" Macro is giving "#VALUE!" error in the Notes field. Ryan Watkins Excel Programming 1 June 11th 05 12:25 AM
Sending macro based e-mail with built-in "Heading" and "Text" Prabha Excel Programming 3 January 17th 05 02:11 PM


All times are GMT +1. The time now is 05:39 PM.

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

About Us

"It's about Microsoft Excel"