Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Finding variables in code

Is there any way to list all the variables used in a VBA project? I would
prefer this to also list the subroutines they occur in, but that's not
essential.

ian


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Finding variables in code

On Apr 15, 8:44*am, "Ian" wrote:
Is there any way to list all the variables used in a VBA project? I would
prefer this to also list the subroutines they occur in, but that's not
essential.

ian


There are a great many programs out there - see he
http://code-snippet-manager.qarchive.org/

What I have done is this:
Copy all the code from the VBE, paste it into excel, then delete all
rows that don't start with "Private", "Public" or "Dim" ....

HTH

Chris
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Finding variables in code

Thanks, Chris, but I was hoping for something free. This costs $40.

Your DIY method will only work if all the variables have a Dim line
associated with them, which is certainly not he case with the code I'm
trying to fathom just now.

Ian

"cht13er" wrote in message
...
On Apr 15, 8:44 am, "Ian" wrote:
Is there any way to list all the variables used in a VBA project? I would
prefer this to also list the subroutines they occur in, but that's not
essential.

ian


There are a great many programs out there - see he
http://code-snippet-manager.qarchive.org/

What I have done is this:
Copy all the code from the VBE, paste it into excel, then delete all
rows that don't start with "Private", "Public" or "Dim" ....

HTH

Chris


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Finding variables in code

On Apr 15, 9:27*am, "Ian" wrote:
Thanks, Chris, but I was hoping for something free. This costs $40.

Your DIY method will only work if all the variables have a Dim line
associated with them, which is certainly not he case with the code I'm
trying to fathom just now.

Ian

"cht13er" wrote in message

...
On Apr 15, 8:44 am, "Ian" wrote:

Is there any way to list all the variables used in a VBA project? I would
prefer this to also list the subroutines they occur in, but that's not
essential.


ian


There are a great many programs out there - see hehttp://code-snippet-manager.qarchive.org/

What I have done is this:
Copy all the code from the VBE, paste it into excel, then delete all
rows that don't start with "Private", "Public" or "Dim" ....

HTH

Chris


No proper declarations? Eep! Put "Option Explicit" at the very top of
every Module, and start declaring (may be too much work, but might be
worth it?)

I did another google search, and I don't see anything for free ... I
bet that one of the experts will have something, though :)

Chris
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Finding variables in code

On Apr 16, 12:03*am, cht13er wrote:
On Apr 15, 9:27*am, "Ian" wrote:





Thanks, Chris, but I was hoping for something free. This costs $40.


Your DIY method will only work if all the variables have a Dim line
associated with them, which is certainly not he case with the code I'm
trying to fathom just now.


Ian


"cht13er" wrote in message


...
On Apr 15, 8:44 am, "Ian" wrote:


Is there any way to list all the variables used in a VBA project? I would
prefer this to also list the subroutines they occur in, but that's not
essential.


ian


There are a great many programs out there - see hehttp://code-snippet-manager.qarchive.org/


What I have done is this:
Copy all the code from the VBE, paste it into excel, then delete all
rows that don't start with "Private", "Public" or "Dim" ....


HTH


Chris


No proper declarations? Eep! Put "Option Explicit" at the very top of
every Module, and start declaring (may be too much work, but might be
worth it?)

I did another google search, and I don't see anything for free ... I
bet that one of the experts will have something, though :)

Chris- Hide quoted text -

- Show quoted text -


Hi,

Not sure exactly what you need to achieve, but within the VBA
environment, you could try upening the 'Locals' window. Head for
'View' - 'Locals'. Once this is visible, step through your code and
all the active variables will be listed with their values and types.
Might help you.

Cheers,
Ivan.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Finding variables in code

Hi Ivan

All I was hoping for was a list of the variables and ideally which
subroutines they are used in. This is even better.

Absolutely perfect!

Many thanks.

Ian
"Ivyleaf" wrote in message
...
On Apr 16, 12:03 am, cht13er wrote:
On Apr 15, 9:27 am, "Ian" wrote:





Thanks, Chris, but I was hoping for something free. This costs $40.


Your DIY method will only work if all the variables have a Dim line
associated with them, which is certainly not he case with the code I'm
trying to fathom just now.


Ian


"cht13er" wrote in message


...
On Apr 15, 8:44 am, "Ian" wrote:


Is there any way to list all the variables used in a VBA project? I
would
prefer this to also list the subroutines they occur in, but that's not
essential.


ian


There are a great many programs out there - see
hehttp://code-snippet-manager.qarchive.org/


What I have done is this:
Copy all the code from the VBE, paste it into excel, then delete all
rows that don't start with "Private", "Public" or "Dim" ....


HTH


Chris


No proper declarations? Eep! Put "Option Explicit" at the very top of
every Module, and start declaring (may be too much work, but might be
worth it?)

I did another google search, and I don't see anything for free ... I
bet that one of the experts will have something, though :)

Chris- Hide quoted text -

- Show quoted text -


Hi,

Not sure exactly what you need to achieve, but within the VBA
environment, you could try upening the 'Locals' window. Head for
'View' - 'Locals'. Once this is visible, step through your code and
all the active variables will be listed with their values and types.
Might help you.

Cheers,
Ivan.


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
finding the results of changing 4 variables irrhelp Excel Discussion (Misc queries) 4 June 19th 12 10:11 PM
Finding the biggest number out of 8 variables Mojo Excel Discussion (Misc queries) 11 June 7th 09 01:00 AM
Finding two variables on the same row to match function Werner[_26_] Excel Programming 2 July 11th 05 09:37 PM
Variables in VB Code David M Excel Programming 1 January 23rd 05 10:08 PM
finding variables in a column solo_razor[_31_] Excel Programming 1 November 12th 03 01:15 PM


All times are GMT +1. The time now is 08:54 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"