P
(Pete Cresswell)
After creating/formatting several worksheets from MS Access, I'd like to delete
the "Sheetn" worksheets that got put there when I did a .WorkBooks.Add.
I avoided using them because I'm not sure how/why they are created - i.e. maybe
some user's defaults would only create 1 empty sheet or none.
So, form MS Access's VBA I'd like to do:
On Error Resume Next
.Worksheets("Sheet1").Delete
.Worksheets("Sheet2").Delete
.Worksheets("Sheet3").Delete
.Worksheets("Sheet4").Delete
On Error GoTo outputFile_Finalize_err
Works, sort of, but the problem is Excel's issuing a confirmation dialog before
acting on every .Delete.
I tried theSS.SetWarnings False like I'd do in MS Access, but Excel's not buying
it. "Error# 438: Object doesn't support this property or method"
Anybody know the magic word?
the "Sheetn" worksheets that got put there when I did a .WorkBooks.Add.
I avoided using them because I'm not sure how/why they are created - i.e. maybe
some user's defaults would only create 1 empty sheet or none.
So, form MS Access's VBA I'd like to do:
On Error Resume Next
.Worksheets("Sheet1").Delete
.Worksheets("Sheet2").Delete
.Worksheets("Sheet3").Delete
.Worksheets("Sheet4").Delete
On Error GoTo outputFile_Finalize_err
Works, sort of, but the problem is Excel's issuing a confirmation dialog before
acting on every .Delete.
I tried theSS.SetWarnings False like I'd do in MS Access, but Excel's not buying
it. "Error# 438: Object doesn't support this property or method"
Anybody know the magic word?