Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBYesNo MsgBox - Computer always says "Yes"
Good afternoon, all!
Apologies for those non UK residents who didn't get the "Little Britain" joke... Can anyone see the deliberate error with this code - no matter what button I click, it always processes the vbYes option. Response returns "7" when i click "No" and "6" when I click "Yes". All help gratefuly received! :-) Sub ConfirmIssuesDelete() Dim Prompt, Buttons, Title, Help, Ctxt, Response, MyString Prompt = "Do you REALLY want to delete this row?" ' Message. Buttons = vbYesNo + vbCritical + vbDefaultButton1 ' Buttons. Title = "Whoa!" ' Title. Help = "D:\DEMO.TXT" ' Define Help file. Ctxt = 1000 ' Define topic Response = MsgBox(Prompt, Buttons, Title, Help, Ctxt) MsgBox (Response) If Response = vbYes Then WhereWasI = (Selection.Address) Selection.EntireRow.Delete IssuesDataRangeFormat Range(WhereWasI).Select Else Exit Sub End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel /vba / computer IP address | Excel Discussion (Misc queries) | |||
Can I install Office 97 on my new windows xp computer? | Excel Discussion (Misc queries) | |||
Msgbox | Excel Worksheet Functions | |||
HOW TO TRANSFER AUTOCORRECT DICTIONARY TO NEW COMPUTER?? | Setting up and Configuration of Excel | |||
Autocomplete works with my home computer but not the office computer | Excel Discussion (Misc queries) |