Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Matthew,
Try the following: Dim Wks As Worksheet Set Wks = ActiveSheet (Note that if you don't specifically state the qualifing hierarchy, Excel will build the hierarchy for you. For example, "Set Wks = ActiveSheet" will be appended to be ActiveWorkbook.ActiveSheet, whereas something like "Set Wks = Workbooks("test.xlsx").Worksheets(2)" will reference a specific worksheet from a specific workbook, regardless of which workbook is currently active). Best, Matthew Herbert "Matthew Dyer" wrote: Set wb2 = Workbooks("LESTER, BRENDA.xls") how do I replace the above code to set wb2 as the active sheet? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Active Cell in Non-Active Worksheet | Excel Programming | |||
Copying the active worksheet to another worksheet in the same work | Excel Worksheet Functions | |||
Basic Question - How do I return the worksheet number of the active worksheet? | Excel Programming | |||
Altering code to reference the worksheet before the active worksheet | Excel Programming | |||
macro to apply worksheet event to active worksheet | Excel Programming |