Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
For example, I'm in Profits worksheet and choose best scenario from the combo box, and it changes B92 in Rev tab. Also, is there a way to keep focus on the worksheet and have it still execute the macro? I assume your macro was recorded and uses things like : Range("A1").DoSomething If you want to do this on just one worksheet, surround your entire code (inside a sub) with: With Worksheets("YourSheet") 'Your code End With Now for each "Range" make sure you prepend it with a dot: .Range(....... This way your code now talks to ranges on "YourSheet". To make sure that worksheet is visible, add: .Activate anywhere within the with...end with construction. Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com Member of: Professional Office Developer Association www.proofficedev.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
executing a macro within another | Excel Discussion (Misc queries) | |||
Preventing macro from .xlt from executing in a .xls | Excel Programming | |||
Executing a macro from a cell | Excel Discussion (Misc queries) | |||
What macro is executing? | Excel Programming | |||
How to abort executing macro? | Excel Programming |