Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
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
do anybody have a sample code for executing excel macro from vb code?<eom B Deepak Excel Programming 2 September 30th 05 09:59 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM
Word VBA Code to Excel Code Lee Excel Programming 1 September 24th 04 04:03 AM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Frank Kabel Excel Programming 0 May 19th 04 08:11 PM


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