Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would include the workbook object
With ActiveWorkbook Set wsQty = .Worksheets(1) Set wsSales = .Worksheets(2) Set wsfinal = .Worksheets(3) End With -- --- HTH Bob (change the xxxx to gmail if mailing direct) "RSteph" wrote in message ... I have an excel workbook with 3 worksheets in it. I'm looking to do some formatting to the first two pages, and then pull some information from each of them to the third page, to create a final report. for ease of navigation between each page in the code, I'm made 3 variables of type worksheet, one to hold each sheet. I've opened external sheets before, from other workbooks, but never within the same workbook, so I wanted to double check that I'm doing this right. Can I simply instantiate my variables like this?: Set wsQty = Worksheets(1) Set wsSales = Worksheets(2) Set wsfinal = Worksheets(3) Assuming that the first page in the quantities, 2nd is sales, and 3rd page is where the final report will go. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Declaring variables for use in multiple worksheets | Excel Discussion (Misc queries) | |||
Declaring variables | Excel Discussion (Misc queries) | |||
Trouble with Declaring Worksheets | Excel Programming | |||
declaring a certain value | Excel Programming | |||
Declaring a DLL | Excel Programming |