Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a formula in a macro to work with worksheets that are named
differently. The formula requires that the name of the worksheet be placed (i.e. "Wheaton") in the code. Set ws = wb.Worksheets("Wheaton") If I want this macro to work with the active worksheet how would I designate it as the active worksheet. Set ws = wb.ActiveworkSheet ? Thanks for your help, cinvic |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
set ws = wb.activesheet
cinvic wrote: I have a formula in a macro to work with worksheets that are named differently. The formula requires that the name of the worksheet be placed (i.e. "Wheaton") in the code. Set ws = wb.Worksheets("Wheaton") If I want this macro to work with the active worksheet how would I designate it as the active worksheet. Set ws = wb.ActiveworkSheet ? Thanks for your help, cinvic -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hey Mr. Peterson! Hope you're doing ok. Thanks again for you help.
"Dave Peterson" wrote: set ws = wb.activesheet cinvic wrote: I have a formula in a macro to work with worksheets that are named differently. The formula requires that the name of the worksheet be placed (i.e. "Wheaton") in the code. Set ws = wb.Worksheets("Wheaton") If I want this macro to work with the active worksheet how would I designate it as the active worksheet. Set ws = wb.ActiveworkSheet ? Thanks for your help, cinvic -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I lock worksheets while macros can still enter into them? | Excel Discussion (Misc queries) | |||
How can I lock worksheets while still allowing macros to operate? | Excel Discussion (Misc queries) | |||
Hide worksheets if macros are disable | Excel Discussion (Misc queries) | |||
macros affecting different worksheets | Excel Discussion (Misc queries) | |||
Unhide Worksheets (hidden via macros) | Excel Discussion (Misc queries) |