msgbox Query

shaylynch

Board Regular
Joined
Nov 11, 2002
Messages
163
hi All,
i have written a macro to update another sheet with certain values, however i am looking for code that if one particular cell is equal to "True" that a MsgBox will ask the question "Are you sure you to Close Project" and if yes that the macro will continue

thanks in advance

Shay
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Something like this :-
Code:
Dim rsp As String
If Worksheets("Sheet1").Range("A1").Value = "True" Then
    rsp = MsgBox("Are you sure", vbYesNo)
    If rsp = vbNo Then
        Exit Sub
    End If
End If
'- continue
 
Upvote 0
hi Brian,
thanks for your reply,
the code works fine, but the only issue i have now is that, this subroutine isn't always used and when that no isn't there, the macro, outside of this sub doesn't seem to work now.

Shay
 
Upvote 0
You will need to change it to do what you need.
I have put Exit Sub which ends the macro.
 
Upvote 0

Forum statistics

Threads
1,214,968
Messages
6,122,509
Members
449,089
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top