Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Old code in Excel add-in (.xla)?
Hello everyone,
We have a couple of Excel 2000 add-ins under maintenance. It looks like the .xla file contains scraps of old code (i.e. code fragments that are no longer there and cannot be found using VBA's search-across-entire-project function). For example, I can see old names of some functions and string literals that are no longer used. Is there any easy way to get rid of all traces of old code? (I mean, something easier than creating an add-in from scratch and exporting/importing code from the old version to the new one.) FWIW: I already tried "VBA Code Cleaner" by AppsPro (http://www.appspro.com/Utilities/CodeCleaner.htm), and it did remove something from the XLA file in question, but those pesky shreds of old code still remain in the file... Thank you, Yarik. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Old code in Excel add-in (.xla)?
Yarik,
http://www.mztools.com/index.htm This may help you identify obsolete code. NickHK "Yarik" wrote in message ups.com... Hello everyone, We have a couple of Excel 2000 add-ins under maintenance. It looks like the .xla file contains scraps of old code (i.e. code fragments that are no longer there and cannot be found using VBA's search-across-entire-project function). For example, I can see old names of some functions and string literals that are no longer used. Is there any easy way to get rid of all traces of old code? (I mean, something easier than creating an add-in from scratch and exporting/importing code from the old version to the new one.) FWIW: I already tried "VBA Code Cleaner" by AppsPro (http://www.appspro.com/Utilities/CodeCleaner.htm), and it did remove something from the XLA file in question, but those pesky shreds of old code still remain in the file... Thank you, Yarik. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Old code in Excel add-in (.xla)?
Hi Nick,
This is a very interesting product you've pointed me to, but... If you meant that I should try its "Find Text" feature, then the question is: Is MZTools capable to search in places that are not accessible by VBA's IDE standard search function? If it is, then how could I _edit_ the code that is not accessible in the VBA IDE itself? Thanks, Yarik. P.S. In any case, the product is really very intriguing. I just might give it a try regardless of whether it can help me with the specific problem in question... NickHK wrote: Yarik, http://www.mztools.com/index.htm This may help you identify obsolete code. NickHK |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Old code in Excel add-in (.xla)?
Yarik,
You mean you have the older macro sheet style code in your workbooks ? NickHK "Yarik" wrote in message oups.com... Hi Nick, This is a very interesting product you've pointed me to, but... If you meant that I should try its "Find Text" feature, then the question is: Is MZTools capable to search in places that are not accessible by VBA's IDE standard search function? If it is, then how could I _edit_ the code that is not accessible in the VBA IDE itself? Thanks, Yarik. P.S. In any case, the product is really very intriguing. I just might give it a try regardless of whether it can help me with the specific problem in question... NickHK wrote: Yarik, http://www.mztools.com/index.htm This may help you identify obsolete code. NickHK |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Old code in Excel add-in (.xla)?
Get Rob Bovey's Code Cleaner:
http://www.appspro.com/Utilities/Utilities.htm -- Jim "Yarik" wrote in message oups.com... | Hi Nick, | | This is a very interesting product you've pointed me to, but... If you | meant that I should try its "Find Text" feature, then the question is: | Is MZTools capable to search in places that are not accessible by VBA's | IDE standard search function? If it is, then how could I _edit_ the | code that is not accessible in the VBA IDE itself? | | Thanks, | Yarik. | | P.S. In any case, the product is really very intriguing. I just might | give it a try regardless of whether it can help me with the specific | problem in question... | | | NickHK wrote: | Yarik, | http://www.mztools.com/index.htm | | This may help you identify obsolete code. | | NickHK | |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Old code in Excel add-in (.xla)?
I tried it before posting my question. Unfortunately, Code Cleaner does
not help. Jim Rech wrote: Get Rob Bovey's Code Cleaner: http://www.appspro.com/Utilities/Utilities.htm |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Old code in Excel add-in (.xla)?
Hi NickHK,
I am not sure I understand your question. What I mean is: when I look into the binary .xla file of my add in, I see "shreds of old code" (function names, string literals, etc.) - code that was there, in the add-in's modules, some time ago but no longer is visible through the VBA code editor. Maybe an example could illustrate my problem better... Let's say, once I had a code like this (in a module of the add-in): Private Const TBL__SELLERS = "tSellers" ... Public Function SellerAttrValue(AttrName as String) as Variant ... sql = "select * from " & TBL_SELLERS & " blah-blah-blah" ... End Function Then, at some point I renamed the function and changed the value of the constant. So the new version of code become looking like this: Private Const TBL__SUPPLIERS = "tSuppliers" ... Public Function SupplierAttrValue(AttrName as String) as Variant ... sql = "select * from " & TBL_SUPPLIERS & " blah-blah-blah" ... End Function Now, the problem is that, when looking in the XLA file using binary viewer, among all those gibberish binary symbols I still see such things as "tSellers" (the old string literal used for a constant), "SellerAttrValue" (old name of the function), etc. But when I use the VBA editor, I do not see any of those things anymore. They are gone from the code long time ago, but they still reside in the add-in's file. So it looks like Excel keeps some elements of the old code in the XLA file (like in a source control repository of sorts). I want to get rid of such "archived" code, but I do not know how. NickHK wrote: Yarik, You mean you have the older macro sheet style code in your workbooks ? NickHK |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
do anybody have a sample code for executing excel macro from vb code?<eom | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming | |||
Word VBA Code to Excel Code | Excel Programming | |||
Excel XP VBA code to search all macro code in Excel module for specific search string criteria | Excel Programming | |||
Excel XP VBA code to search all macro code in Excel module for specific search string criteria | Excel Programming |