Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Below is a portion of my code that I am trying to use to Mail a Report
If a certain value is in Report K6. I have introduced a Message Box with Yes/No and my code is not mailing, but has not error messages. The scenario in my example below is: If the City shown is London a message box should appear that asks "Are you sure you wish to e-mail Joe Bloggs", if user clicks "No" then the whole sub should exit (reverting to cell K6). If user select "Yes" then sub should continue and run the macro "Mail_Joe_Bloggs" This macro ""Mail_Joe_Bloggs" does work as it did run before I tried to introduce the message box Thanks With Worksheets("Report") If .Range("K6").Value = "London" Then Msg = "Are You sure you wish to e-mail Joe Bloggs?" Title = "Correct City Test" Response = MsgBox(Msg, vbYesNo + vbQuestion, Title) End If If Response = vbNo Then MsgBox "Go Back and Change to Correct City" Sheets("Report").Activate Range("K6").Select Exit Sub End If If Response = vbYes Then Mail_Joe_Bloggs End If End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
replace VBA run-time error message with custom message | Excel Programming | |||
Replace Excel Message w/Custom Message | Excel Programming | |||
Intercept/replace standard 'cell protected' message with my own message? | Excel Programming | |||
Opening an attachment of a message that has a message as attachmen | Excel Programming | |||
Displaying a message in a message box without requiring user to click anything to proceed | Excel Programming |