Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default worksheet.activate not activating

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default worksheet.activate not activating

I appreciate your experience and comments. I am in fact unable to use
my computer effectively while my program is running.

I am opening up approximately 50 or so files one at a time, processing
data on from these files, adding charts and performing various
algorithms, and then saving the file as an xls. I use the
activeworkbook and activeworksheet throughout the code (errr).

anyhow, to answer your question, at the end of my program, I do change
screenupdating back to true before I apply worksheet.activate. What is
happening is that once my program begins, various worksheets in the
program become active, and upon termination, i want to user to start
off where he began. if there is another way, i'd be obliged to know
it.

Thanks.

Smokii

  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default worksheet.activate not activating

i'm sure...i have a single file where i run my program...and it has a
specific sheet name. it worked a few iterations ago, but it suddenly
stopped.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activating a Worksheet? Kenny R Excel Discussion (Misc queries) 3 December 8th 06 05:15 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Worksheet activating JamesM[_2_] Excel Programming 0 September 28th 04 04:34 PM
Worksheet activating JamesM Excel Programming 0 September 28th 04 03:55 PM
Activate Macro on Activating a sheet Bob Phillips[_6_] Excel Programming 0 June 4th 04 05:19 PM


All times are GMT +1. The time now is 08:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"