Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default minimum # of variables

This is probably a complicated question . . .

I have just finished a fairly large (for me) sub procedure. I think I may
have ended up using one or two more variables than I needed. Is there a way
I can verify that I have used the minimum number of variables that will do
the task?

Thanks again, everybody, for your excellent advice . . .

Jamie


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default minimum # of variables

Is there a way I can verify that I have used the minimum number of
variables that will do the task?

Not really, if you're looking for something automatic or automated. If you
think you've declared variables that you do not use you can do a Find on
them, limiting the Find scope to the current procedure. If it's just one or
two, as you said, it is not worth the bother however,

A better question might be, if your procedure is so big that it's hard to
know what variables are used in it, whether you shouldn't have chunked out
your code into smaller, easier to understand and maintain, sub procedures.


--
Jim Rech
Excel MVP


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default minimum # of variables

hi,
visit http://www.mztools.com/ and download mz-tools.
that add-in has several utilities for vba codes like "Review Source Code".
when you run that utility, it shows unused variables in project.


Regards

Haldun


"Jamie Martin" , iletide şunu yazdı
...
This is probably a complicated question . . .

I have just finished a fairly large (for me) sub procedure. I think I may
have ended up using one or two more variables than I needed. Is there a

way
I can verify that I have used the minimum number of variables that will do
the task?

Thanks again, everybody, for your excellent advice . . .

Jamie




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
MINIMUM Pam M Excel Worksheet Functions 4 August 31st 09 04:06 PM
Not at all clear on use of variables and/or object variables JMay-Rke Excel Discussion (Misc queries) 11 July 4th 08 06:36 PM
minimum and the corresponding value dinesh kumar Excel Worksheet Functions 4 September 12th 07 08:59 PM
Minimum Value Alex Excel Worksheet Functions 2 August 1st 07 03:44 PM
How to lookup the minimum, 2nd minimum and 3rd minimum......... Mark McDonough Excel Worksheet Functions 8 July 15th 06 09:39 PM


All times are GMT +1. The time now is 05:26 PM.

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"