Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Warning Statement to Delete Macro
Hello,
I want to create a delete row macro button in a spreadsheet for several users and want to add a warning comment such as "Are you sure you want to delete this row?". I do not know VB very well. Can someone help me with this code? Thanks. John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Warning Statement to Delete Macro
Take a look in vbe HELP indes for inputbox
-- Don Guillett SalesAid Software "John M" wrote in message ... Hello, I want to create a delete row macro button in a spreadsheet for several users and want to add a warning comment such as "Are you sure you want to delete this row?". I do not know VB very well. Can someone help me with this code? Thanks. John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Warning Statement to Delete Macro
John, how about something like this, assign it to a button on your sheet
Sub test() Msg = "Are You Sure You Want To Delete Row 2 ?" Title = "Continue ?" Response = MsgBox(Msg, vbYesNoCancel + vbQuestion, Title) If Response = vbNo Then Exit Sub End If If Response = vbCancel Then Exit Sub End If Rows("2:2").Delete Shift:=xlUp End Sub -- Paul B Always backup your data before trying something new Using Excel 97 & 2000 Please post any response to the newsgroups so others can benefit from it ** remove news from my email address to reply by email ** "John M" wrote in message ... Hello, I want to create a delete row macro button in a spreadsheet for several users and want to add a warning comment such as "Are you sure you want to delete this row?". I do not know VB very well. Can someone help me with this code? Thanks. John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro warning - how to delete macro | Excel Worksheet Functions | |||
using VBA how can I delete a worksheet w/o the warning message pop | Excel Discussion (Misc queries) | |||
Why security warning still appear after I delete all macros | Excel Worksheet Functions | |||
What is the VBA code to delete a sheet without warning message? | Excel Discussion (Misc queries) | |||
Can I add a Warning Meassage to a Macros Designed to Delete a Row | Excel Worksheet Functions |