View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Schanks Bill Schanks is offline
external usenet poster
 
Posts: 23
Default Formula Creation via Add-in problem

For anyone interested, I have found that the only way to solve this is
to have the Add-in installed in a common place on the PC for all users.

Rather than %USERPROFILE%\Application Data\Microsoft\AddIns.

What a pain, since I don't have installer creation utilities.

Here is what I did:

Private Sub Workbook_AddinInstall()

On Error GoTo Workbook_AddinInstall_ErrHandle

Dim fso As New FileSystemObject

'Add-in must be installed in the same place for UDF's to work for all
users
'Since I don't have access to an install builder (VBA, C#, Etc...) This
is the best we can do
If Not (AddIns("CSSB Delim File Opener").Path & "\" = conInstallPath)
Then

Call MsgBox("Addin Must be installed in this path: " & vbCrLf _
& conInstallPath & vbCrLf & vbCrLf _
& "A copy of the add-in had been copied there. " _
& "Please go back into the add-in manager and browse " _
& "to this location.", vbCritical + vbOKOnly, conAppName)

If Not fso.FolderExists(conInstallPath) Then fso.CreateFolder
(conInstallPath)
fso.CopyFile AddIns("CSSB Delim File Opener").FullName,
conInstallPath & _
AddIns("CSSB Delim File Opener").Name, True
AddIns("CSSB Delim File Opener").Installed = False
Application.Dialogs(xlDialogAddinManager).Show
GoTo Workbook_AddinInstall_Exit

End If

.... Remaining code snipped.