K
kvenku
I use a VBS script to open a excel file and delete the sheets based o
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 fo
deletion. To premanently delete the data, press Delete) when i run thi
script. How to avoid this. There should not be any alert message whil
deleting the sheets.
Thanks in advance
__________________
Kalyana Venkatesh
Eagle Consulting
(e-mail address removed)
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 fo
deletion. To premanently delete the data, press Delete) when i run thi
script. How to avoid this. There should not be any alert message whil
deleting the sheets.
Thanks in advance
__________________
Kalyana Venkatesh
Eagle Consulting
(e-mail address removed)