Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveWorksheet vs Worksheets.Item(1)
Hi
Trying to learn automating excel via vba Dim oWb as Workbook Set oWb = oExcelApp.WorkBooks.Add (TEMPLATE_NAME) 'that works Dim oWs as WorkSheet Set oWs = oWb.Worksheets.Item(1) 'That works so the above line is ok but I thought maybe this would be a "better" way I assumed a new workbook would begin with the first sheet activated??? 'Set oWs = oExcelApp.ActiveWorkSheet 'but it throws error (Object doesn't support this property or method) What is the proper way to get the first sheet in a new workbook? Thanks Mark |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linking item between two worksheets | Excel Worksheet Functions | |||
Keyboard Shortcut to toggle b/w Find and Replace and ActiveWorksheet? | Excel Discussion (Misc queries) | |||
Copy ActiveWorksheet Columns B,C,F to Another Worksheet in Workboo | Excel Programming | |||
Automating a line item for several worksheets? | Excel Worksheet Functions | |||
hyperlink item#'s across worksheets | Excel Programming |