Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Toltag, but that's not what I meant. I'm talking about the ability
to refer to as simply Sheet1 as in: Sheet1.select If you open a new workbook and look in the project explorer under Microsoft Excel Object you'll see something like: Sheet1 (Sheet1) and you can refer to a sheet as simply Sheet1 without quotes or using the collection syntax, e.g.: Sheet1.Select However, I can't figure out how to use this syntax while referring to workbooks other than the active workbook. Doug "tolgag " wrote in message ... Hi Doug, Since you can call worksheets only from a collection (not directly with their names), you need to use an object variable or type the collection Try this : Dim xsThisWorksheet as Worksheet Set xsThisWorksheet = Workbooks(WorkbookIndex).Worksheets(SheetIndex) you can have the same result by using workbookname and sheetname. But don't forget to put them into ", if you use names. --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
[=Sheet1!A1] - if i use Column A1 ('Sheet1') / A2 ('Sheet2') | Excel Worksheet Functions | |||
How do I set up a workbook so changing Sheet1 changes all sheets? | Excel Worksheet Functions | |||
copy sheet1 from all open workbooks to one workbook | Excel Programming | |||
How? Force Sheet1 to display each time the workbook is opened. | Excel Programming | |||
Sheet1 object not Worksheets("Sheet1") | Excel Programming |