Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default VBA Code for pop confirmation box

Hi

I have a macro assigned to a button on my spreadsheet, but I would like to
have a confirmation box pop up asking the user if they are sure they want to
proceed. Obviously i need the pop up to proceed with running the macro if
they choose yes and to stop the macro if they choose no. Thanks for any
advice.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default VBA Code for pop confirmation box

This might work
If MsgBox("Click yes to proceed or no to cancel", vbQuestion + vbYesNo) <
vbYes Then
MsgBox ("you clicked no")
'do nothing
Else
MsgBox ("you clicked yes")
'do something
End If

"Leigh Douglass" wrote:

Hi

I have a macro assigned to a button on my spreadsheet, but I would like to
have a confirmation box pop up asking the user if they are sure they want to
proceed. Obviously i need the pop up to proceed with running the macro if
they choose yes and to stop the macro if they choose no. Thanks for any
advice.

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
Confirmation Security Babs in Ohio Excel Worksheet Functions 0 April 15th 09 06:20 PM
A question about the confirmation loveflying_best[_2_] Excel Discussion (Misc queries) 1 October 8th 07 12:42 PM
Confirmation box alex1982[_4_] Excel Programming 6 August 15th 06 02:23 PM
Secret Code for Confirmation Dinesh Excel Worksheet Functions 3 August 10th 06 01:41 AM
Getting rid of confirmation boxes DandruffKid New Users to Excel 2 March 28th 05 11:05 AM


All times are GMT +1. The time now is 09:54 AM.

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"