False message .xla already open
Another one to look at might be clearing out the temp folder.
RBS
"Peter T" <peter_t@discussions wrote in message
...
Hi Bart,
Wonder if you are getting accurate details from your user
Then the message appears: add-in already opened.
Are you sure this is the actual message and not -
'A file named blah already exists in that location, do you want to replace
it"
This may occur whether or not the file is loaded but in the addins
collection, eg nearby in the registry under
\Excel\Addin Manager
Another possibility is two addins with same 'Title' but different names
exist in the same folder. The one with the unexpected name, not listed as
an
addin, might get loaded.
If you get hooked up with Rob's suggestion try this -
Option Explicit
Option Compare Text
Sub test()
Dim i&
Dim sDef1$, sDef2$, s$
Dim adn As AddIn
Dim wb As Workbook
Cells.Clear
sDef1 = Application.UserLibraryPath
sDef2 = Application.LibraryPath
Cells(1, 6) = sDef1
Cells(2, 6) = sDef2
i = 3
For Each adn In Application.AddIns
i = i + 1
With adn
If .Installed Then
Cells(i, 2).Value = "Installed"
If Len(.Path) Then
'ignore MS system addins without path
On Error Resume Next
Set wb = Application.Workbooks(.Name)
Cells(i, 1) = IIf(wb Is Nothing, "missing", "loaded")
On Error GoTo 0
Set wb = Nothing
End If
End If
Cells(i, 3).Value = .Title
Cells(i, 4).Value = .Name
s = ""
If .Path & "\" = sDef1 Then
s = "Def Path 1"
ElseIf InStr(1, .Path, sDef1) Then
s = "Def Path 1 sub"
ElseIf .Path & "\" = sDef2 Then
s = "Def Path 1"
ElseIf InStr(1, .Path, sDef2) Then
s = "Def Path 2 sub"
ElseIf Len(.Path) = 0 Then
s = "system"
End If
Cells(i, 5).Value = s
Cells(i, 6).Value = .FullName
End With
Next
Columns("A:E").EntireColumn.AutoFit
End Sub
Regards,
Peter T
"RB Smissaert" wrote in message
...
Trying to solve somebody's .xla add-in problem and have come across a
strange thing.
This is the sequence:
One .xla loaded and shows with tick in Tools, Add-ins.
Un-tick this and close Excel
Re-start Excel
Tools, Add-ins, Browse to same add-in and do OK.
Then the message appears: add-in already opened.
When you look in the VBE that file is not opened.
Looked in the registry under
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcel\Options\
and that .xla doesn't show there. Looked under lower Excel versions as
well
and file doesn't show in one of
the Open keys.
So why this message?
The actual problem with this person shows somewhere else, but it seems
that
this is an indicator that
somehow/somewhere there is something seriously wrong here.
The problem is I can't see this computer, so I have to solve it via
e-mail
and phone and that is not that easy.
Any suggestions?
RBS
|