Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Formula Creation via Add-in problem

I have this formula that gets created via a subroutine in an Add-in:

=CSSB_NbrOfItems(Sheet1!AB2:AB918,1)

When I create the workbook, and then reopen it it looks just like
above. But if other users open the workbook, the cell looks like this:

='D:\Documents and Settings\wjschan\Application
Data\Microsoft\AddIns\CSSB Delimited
File.xla'!CSSB_NbrOfItems(Sheet1!AB2:AB918,1)

Excel asks if the user want's update links, but it doesn't work as they
don't have access to files on my computer.

Each user needing to open file has the add-in installed, so the UDF is
available.

Is there a way to not put 'D:\Documents and
Settings\wjschan\Application Data\Microsoft\AddIns\CSSB Delimited
File.xla'! in the formula?

  #2   Report Post  
Posted to microsoft.public.excel.programming
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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula creation maud0361 Excel Discussion (Misc queries) 6 April 9th 07 11:59 AM
Problem with chart creation. daniel chen Charts and Charting in Excel 3 January 11th 06 04:00 AM
Problem with chart creation daniel chen Excel Discussion (Misc queries) 2 January 8th 06 06:27 PM
Ultimate circular problem for chart creation nick g Excel Discussion (Misc queries) 1 July 26th 05 01:18 PM
Automatic Number Creation Problem? Corp Excel Worksheet Functions 1 April 6th 05 06:19 AM


All times are GMT +1. The time now is 04:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"