View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Subscript error in 2007 when testing if Addin is installed

Hi Bernie and thanks.

That is the line where the error occurs, however your suggestion still fails
to prevent a subscript error if a "False" reply is generated...

Any other suggestions?

"Bernie Deitrick" wrote:

Is the error on the line

If AddIns(argName).Installed = True Then


If so, then try:

If cBool(AddIns(argName).Installed) = True Then


HTH,
Bernie
MS Excel MVP


"XP" wrote in message
...
In Office 2007, I'm using the following function to determine whether an
Add-in is installed, but if the answer is "False", rather than false, I get
"Subscript out of range" error. Any idea what I'm doing wrong? How can I get
this to run right?

Private Function AddInInstalled(argName As String) As Boolean
'return true if an addin is installed:
If AddIns(argName).Installed = True Then
AddInInstalled = True
Else
AddInInstalled = False
End If
End Function

Thanks in advance...