Sabtu, 14 April 2012

Re: [ExcelVBA] Re: Using Literals in Formulas

 


Most of my VBE manipulating stuff is available as an add in on the codecage forums. The complete addin is quite large but I find it very usefull. The two most useful being code to delete things like Debug.Print and to insert Debug.Print.

I have the latter set up so that... If no code is selected then it will ask for a comment and insert something like
Debug.Print "L14"
...where L14 is the line number or ..
Debug.Print "L14 Comment"
.. if you enter a comment.
If a variable is selected then it will still prompt for a comment but will insert the variable as well....
Debug.Print "L84 ilEndOfDims" & ">" & ilEndOfDims & "<"
I check through thr procedure Dims to see if it actually is a variable.
It will also enter highlighted expressions...
Debug.Print "L187 ilSPos + 1" & ">" & ilSPos + 1 & "<"

There are various options...
Insert above or below the line you're on or both
Print the current line
Print Procedure name
Print Module name
Print Project name
Print Line number
Print the selection
Add a bookmark
Add Stop afterwards.

It uses an INI file to save all this.

I can send you the whole addin if you like rather than split it up or you can download it from the codecage. It's worth registering there anyway I think... good rescource. It's better to get the whole thing anyway because of dependancies.

Other stuff will insert timing code and trace lines... in and out of procs ... prob the same as you have already but "automated". There's also code to insert Dims and to clean out unused ones.

A complete list ... well mostly... it's an ongoing project :-) is here.. http://www.thecodecage.com/forumz/view.php?pg=vbacleanup2

Let me know...

Lisa

To: ExcelVBA <ExcelVBA@yahoogroups.com>
Sent: Fri, Apr 13, 2012 10:22 pm
Subject: [ExcelVBA] Re: Using Literals in Formulas

omething told me there would be such code...
While, to keep file size down, I frequently think that I'll remove them all
efore "releasing" a Workbook, Tracking versions is a pain and I just decide to
eave them in.
However, since it is available, please send it (unless it is already in the
iles Area) and I'll add it to the long list of hints n' kinks n' Ho-To's in my
BA folder.
"Insert them" ... ? ? Like ... how/where?
Regards, Steve

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar