PDA

View Full Version : Delete Sheet



rajpalmanish
01-21-2006, 01:49 PM
I want to delete a sheet from workbook without any instructions or message box. When i try to delete the sheet it ask

"Data may exist in the sheet(s) seletion for deletion. To permanentely delete the data, press delete."

How can I do this?

Thanks and Regards
Manish Rajpal

XLGibbs
01-21-2006, 01:51 PM
You can disable alert messages with this

Application.DisplayAlerts = False


just turn it back on after the procedure.

Hope it helps.

rajpalmanish
01-21-2006, 02:06 PM
You can disable alert messages with this

Application.DisplayAlerts = False


just turn it back on after the procedure.

Hope it helps.
Hi,

Thanks and it is working fine.

Can you also tell me how can I define names for the range through VBA.

XLGibbs
01-21-2006, 02:09 PM
How do you mean? For using within code or a defined name for use in formulas on the sheet

For named ranges for the workbook, adding via VBA

ActiveWorkbook.Names.Add Name:="NamedRange",RefersToR1C1:="=Sheet1!R1C1"

or
ActiveWorkbook.Names.Add Name:="NamedRange", RefersTo:="=Sheet1!$A$1"

Zack Barresse
01-21-2006, 09:06 PM
Now why would you cross post like that ..

http://www.puremis.net/excel/cgi-bin/yabb/YaBB.pl?num=1137876493/2#2

If you cross-post again, please leave a link to other posts.. so we don't all waste duplicated efforts.. thanks.

Shazam
01-22-2006, 07:55 PM
Another cross posting!

http://www.theofficeexperts.com/forum/showthread.php?t=5567

XLGibbs
01-22-2006, 08:04 PM
Yikes. He could at least respond to some of these. This thread is the only one with a response. He must be running out of forums by now, should be lap two coming around soon. :motz2::bug:

Zack Barresse
01-23-2006, 08:19 AM
Thread has been locked.

DO NOT CROSS POST WITHOUT A LINK OR YOUR THREAD WILL BE LOCKED. PERSIST AND YOU SHALL BE BANNED.

Thank you.