Third-Party Add-in, Names

L

legacyvbc

We have some third party software that we use at our company to pull
financial data from their database. They are using an xll add-in and
they also have a few .dll files in the install directory. I can't see
any of the code or even how they are calling it by recording a macro
but I notice that if their add-in is enabled, it automatically adds
over 2000 defined names to the workbook. They cannot be seen using
the standard name view but to manage names I use the incredibly handy
Name Manager 4.0 utility (developed by Jan Karel Pieterse in
collaboration with Decision Models,UK). The problem with the names is
that the utility reads all of them so it takes much longer to work
with it and more importantly it adds about 200kbp to every file even
if the file is not using any of the third party functions/formulas.
Does anyone have any ideas as to how I can get rid of all these names
automatically (aside from manually doing it with the name manager
utility)?

Thanks
 
P

Peter T

Sub DelNames(wb As Workbook)
Dim nm As Name
' For Each nm In wb.Names
If Not nm.Visible Then
nm.Delete
' End If
Next
End Sub

Sub test()
DelNames ActiveWorkbook
' DelNames Workbooks("Book1.xls")
End Sub

You say the addin only adds hidden names so you could uncomment the If...End
If to only delete those. Or do some further check if there's something in
common with all the names, eg prefix.

It seems odd the addin wants to add names to all loaded workbooks "even if
the file is not using any of the third party functions/formulas". It might
worth finding out more, at the very least to ensure the addin will function
correctly after deleting the names.

Regards,
Peter T
 
L

legacyvbc

Thanks for the help. I emailed them regarding this and they are
looking into since it really is odd.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top