I use a VBS script to open a excel file and delete the sheets based on some condition and Save and then close it.
The sampe script is
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
On Error Resume Next
objExcel.workbooks.open "D:\FIPackageNEW.xls"
For Each ws In objExcel.Worksheets
If not ws.Name = "Sheet1" Then
ws.delete
End If
Next
objExcel.Save
objExcel = Nothing
objExcel.quit
I am getting a message (Data may exists in the sheet(s) selected for deletion. To premanently delete the data, press Delete) when i run this script. How to avoid this. There should not be any alert message while deleting the sheets.
Thanks in advance
__________________
Kalyana Venkatesh
Eagle Consulting
[email protected]
Bookmarks