Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Apologies to those of you who've already picked this up in the Excel forum.
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 | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
NEW QUEST/REQ in "How to Reverse Contents ..." Pls Respond? TIA | Excel Worksheet Functions | |||
Best way to trap error to MsgBox "Too many cell formats" | Excel Discussion (Misc queries) | |||
VBYesNo MsgBox - Computer always says "Yes" | Excel Discussion (Misc queries) | |||
excel.application.run macro1 -- added code to respond "yes" to a inputbox | Excel Programming |