View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
tolgag[_4_] tolgag[_4_] is offline
external usenet poster
 
Posts: 1
Default specifying workbook for Sheet1

Hi Doug,

Since you can call worksheets only from a collection (not directly wit
their names), you need to use an object variable or type th
collection

Try this :

Dim xsThisWorksheet as Worksheet

Set xsThisWorksheet = Workbooks(WorkbookIndex).Worksheets(SheetIndex)

you can have the same result by using workbookname and sheetname. Bu
don't forget to put them into ", if you use names

--
Message posted from http://www.ExcelForum.com