ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Just a tip I have picked-up (https://www.excelbanter.com/excel-programming/290378-re-just-tip-i-have-picked-up.html)

Beto[_3_]

Just a tip I have picked-up
 
Russell Lucas wrote:

Hi everyone,

I have looked at a lot of code in this forum, and I have seen a lot of ActiveCell and ActiveSheet begin used. This is somthing I was doing myself up in till a couple of days ago when a coleague recommended using absolute references. I tested this and found that it not only made the code more robust, it also improved speed four fold.

I can't morally keep that to myself so I thought I would share that with anyone who does not already know.


Canyou give an example on replacing ActiveCell or ActiveSheet with
absolute references??

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.


KJTFS[_92_]

Just a tip I have picked-up
 
Well they are used for different things, everything has a time and
place if you are using active.... in the wrong cases then yes it is ba
but if your using absolute range("..").offset in the wrong place i
wont be good either. Activesheet and activecell are nice ways to kee
macros general, say you want one macro to work with a bunch o
different sheets, which the sheet will always be the activesheet, the
active sheet is a good choice.

Keith
www.kjtfs.co

--
Message posted from http://www.ExcelForum.com


Beto[_3_]

Just a tip I have picked-up
 
KJTFS < wrote:

Well they are used for different things, everything has a time and a
place if you are using active.... in the wrong cases then yes it is bad
but if your using absolute range("..").offset in the wrong place it
wont be good either. Activesheet and activecell are nice ways to keep
macros general, say you want one macro to work with a bunch of
different sheets, which the sheet will always be the activesheet, then
active sheet is a good choice.


That's exactly what I think. That's why I wanted an example... to see
the use given to each one of them.

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.



All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com