I need to interact with Excel via the Microsoft Excel 9.0 Oject Library.
My issue is I can not itterate through custom views I have created in excel for the life of me
My issue is I can not itterate through custom views I have created in excel for the life of me
VB.NET:
Imports EXCEL
Private sub test()
Dim ExcelApp As Excel.Application
ExcelApp = New Excel.Application
ExcelApp.Visible = True
Dim wb As Excel.Workbook = ExcelApp.Workbooks.Open("C:\test.xls")
'I can see the count of my custom views by doing
debug.write(wb.CustomViews.Count())
'I can get my custom view by doing
Dim cv As Excel.CustomView = wb.CustomViews.Item("MyView1")
'My issue is I need to itterate through the custom view collection for each view to get the name.
'I can not hard code each one in. The below code does not work:
Dim c As CustomView
For Each c In wb.CustomViews
Debug.Write(c.Name())
Next
'Any Sugestions?
end sub