[dba-Tech] Excel question about "current" sheet

Hale, Jim Jim.Hale at FleetPride.com
Mon Apr 9 11:57:15 CDT 2007


Be aware, however, that when using this syntax it is dangerous to open
another instance of Excel because the code may grab it as the "active" sheet
(after all it is!) and get totally confused. Many times I have had code
running to manipulate hidden Excel workbooks, forgotten, opened an Excel
workbook attachment on an email only to have the VBA program suffer a
nervous breakdown. Some day I will get rid of all the active references but
so far I have been too lazy. My "solution at the moment has been to use two
machines. <hangs head in shame>
Jim Hale

-----Original Message-----
From: dba-tech-bounces at databaseadvisors.com
[mailto:dba-tech-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Sunday, April 08, 2007 4:38 PM
To: dba-tech at databaseadvisors.com
Subject: [dba-Tech] Excel question about "current" sheet


Hi Susan

ActiveWorksheet?

/gustav

>>> ssharkins at setel.com 08-04-07 22:48 >>>
Using VBA, is there a generic way to express "the current sheet" instead of
hard-coding a sheet by name? 

Susan H. 

_______________________________________________
dba-Tech mailing list
dba-Tech at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-tech
Website: http://www.databaseadvisors.com

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.


More information about the dba-Tech mailing list