Does it appear in the disabled items list?
Nope.
Let me try to summarize the situation all in one place.
I have (or had) two personal add-in modules. The filenames are:
My Add-Ins.xlam and
Temp Add-Ins.xlam. Both of these files exist in this folder:
Code:
C:\Documents and Settings\Administrator\Application Data\Microsoft\AddIns
Both of these add-ins have been around for at least 10 years. I haven't done anything in the second one (Temp Add-ins) for a long time and actually forgot that it existed, but I use the first (My Add-ins) all the time. I add and edit UDFs to do little chores as I need to. My Add-ins has about a dozen code modules. One, MyUtil, contains most of my utility UDFs. The others contins UDFs for specific projects or for testing
I don't recall now how I created these add-ins originally or how activated them.
I have several other add-ins that I downloaded or installed from third parties or that were installed by other software that I had.
About a week ago or so, I started work on a complicated Excel application. I wrote a UDF (WtdRtg) which I put it in the MyUtil module of My Add-ins. WtdRtg processes data in 6 ranges. It compares the data in the first range against the corresponding data in the other 5 ranges. Here's the function declaration.
Code:
Public Function WtdRtg(pRatings As Range, _
pRtgsBest As Range, _
pRtgsWrst As Range, _
pRtgTypes As Range, _
pRtgReq As Range, _
pRtgWts As Range, _
ParamArray PArgs() _
) As Variant
WtdRtg got more and more complicated. One If block was two screen long. I started putting code in subfunctions. These also went into My Add-ins right below WtdRtg. I initially coded the subfunctions as Private. The main one was an error handler. It was designed to generate standard MsgBox error messages complete with the address of the cell from which the UDF was called and the address of the cell that caused the error. In the past, I have had problems with UDFs that generate MsgBox error messages. If the UDF is called many times in a sheet, I would have to clear each error message before I could get back to work. So in this error handler, I added a switch that would enable or disable the MsgBox messages and the option to execute a breakpoint after each MsgBox message so I could change the switch and disable the rest of the messages.
Here's that declaration.
Code:
Private Sub WtdRtgErr(CallerName As String, CallerAddr As String, ErrMsg As String, _
Optional ErrCellAddr As String)
I also did a little experimenting with global variables.
About the same time that I started moving blocks of code to subfunctions, I started getting odd behavior whenever an error occurred. I would set a breakpoint (F9) at the point where the error was occurring. When I resumed execution, the UDF (WtdRtg) would get called several more times. I added code to capture the calling cell address. It showed that the UDF was being called from cells containing data, not calls to the UDF.
As part of the debugging process, I decided to move all of the code for this project to a new code module in My add-ins. I right-clicked on My Add-Ins in Project Explorer and selected Insert | Module. Then I opened the Properties dialog and changed the name of the module to WtdRtg.
Is there a problem with a code module having the same name as a UDF in that module?
I then moved the WtdRtg code and all subfunctions from the MyUtil module to the WtdRtg module, both in My Add-ins.
I did a little testing and everything seemed to be working. It was about this time that I needed to stop work for the day, so I closed the VBE and Excel. The next day. when I started work again, the WtdRtg module was missing and all of the WtgRtd code was back in MyUtil. I then realized that I hadn't remembered to save the Add-in and the morons at Microsoft do not even warn us if we close an add-in without saving changes. Grrrrr.....
So I redid the work to move the code. I am not sure now if this is when the entire add-in went missing or sometime later.
So here's the current situation.
- In the add-in folder shown above, both add-in files are present. I tried opening My Add-ins with Notepad, but it was unreadable. I was afraid to open it with Excel.
- If the Project Explorer in the VBA editor, Temp Add-ins is visible, My Add-ins is not.
- In the Excel Add-In dialog (File | Options | Add-Ins), Temp Add-Ins is listed in the Active Add-Ins, My Add-ins is not listed in either the Active or Inactive Add-Ins.
- If I then click on Manage Excel Add-Ins | Go, Temp Add-Ins is listed and checked, My Add-Ins is not listed.
- If I click on Manage Disabled Items... | Go, no items are listed.
Is there any other information that I need to provide?
Since I have the add-in file, can someone please just tell me how to go about reinstalling it?
Thanks
PS: I really need to get this working again as soon as possible. Most of my workbooks depend on UDFs in my add-in, so I am kinda disabled as it is now. Thanks.