View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ronald Dodge Ronald Dodge is offline
external usenet poster
 
Posts: 111
Default worksheet.activate not activating

I never had a such problem myself with this sort of issue. However, as a
general rule of thumb, I avoid using the "Activate" method unless it's
really needed, which should really be the exception rather than the norm. I
know the macro recorder uses the Activate method, but it's limited to what
it can do, and most times, it's only really there to learn how macros are
created and ran, which is how I got started working with macros in Excel.
However, along the way early on, I ran into several issues (this was when I
was using Excel 97, SR2) using the Select and Activate methods (Select on
ranges and Activate on worksheets). This also was the same type of reasons
why I don't use ActiveWorksheet or ActiveWorkbook so much either. Much of
the programming that I did real early on, it involved several worksheets and
something like 20 to 25 different workbooks, though not all at one time, but
still, enough to where it caused some issues, and not only that, but I also
wanted to be able to use the computer for other things while the program was
running, which meant I had to eliminate the ActiveWorkbook, ActiveWorksheet,
Activate Method, and Select Method all together from my program, as well as
any SendKeys statements/functions. As far as that's concerned, there is one
such program that I have to use the SendKeys statements for, which by the
way, I only trust the Application's SendKeys, not VBA's SendKeys, as there's
an issue with the VBA one.

Are you using "Applicaiton.ScreenUpdating"? if you are setting this to
False for efficiency purposes, reset this to "True" at the end of the code,
as this has to be done else you won't get what you need.

--
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000

wrote in message
oups.com...
as a last command to several routines in a program, I have a line with
worksheets("....").activate; however, the worksheet does not get
activated upon termination of the program. Any ideas how to get this
to happen?

Thanks.

Smokii