B
Bas
I',m trying to delete a named worksheet - what's wrong with this??
xlApp = New Excel.Application()
Dim xWorkbook As Excel.Workbook
Dim PageSht As Excel.Worksheet
xWorkbook = xlApp.Workbooks.Open("Test.xls")
Dim pageWkSht As Excel.Worksheet
pageSht = xWorkbook.Sheets("Page")
pageSht.Delete()
No error is generated and the sheet is NOT deleted
xlApp = New Excel.Application()
Dim xWorkbook As Excel.Workbook
Dim PageSht As Excel.Worksheet
xWorkbook = xlApp.Workbooks.Open("Test.xls")
Dim pageWkSht As Excel.Worksheet
pageSht = xWorkbook.Sheets("Page")
pageSht.Delete()
No error is generated and the sheet is NOT deleted