Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default using a *.xslm add-in with several users

Hi,

I wrote an Excel add-in which I want two distinct users to use. It all works
perfectly fine while working locally with one user. It loads on startup and
returns the correct values while one user uses it. However if I use the
function contained in the add-in in a spreadsheet which i save and then send
to a colleague who also has the add-in installed the cell no longer returns
the correct Value, but tries to find the add-in at the path where it was
saved on the first user's computer.

How can I correctly use functions defined in an add-in across different
users who both have the add-in installed?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default using a *.xslm add-in with several users

I think the easiest thing to do is to tell each (all!) recipients to put the
addin in the same folder name:

C:\PhijsAddins\youraddinname.xla

Then excel will always look to that path.

Yep, you'll have to teach them to use Edit|Links (xl2003 menus) for the
workbooks that they've already started.

phij wrote:

Hi,

I wrote an Excel add-in which I want two distinct users to use. It all works
perfectly fine while working locally with one user. It loads on startup and
returns the correct values while one user uses it. However if I use the
function contained in the add-in in a spreadsheet which i save and then send
to a colleague who also has the add-in installed the cell no longer returns
the correct Value, but tries to find the add-in at the path where it was
saved on the first user's computer.

How can I correctly use functions defined in an add-in across different
users who both have the add-in installed?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default using a *.xslm add-in with several users

Hi Dave,

thanks for the quick reply. That solves the Problem. However saving the
add-in to C:\ or C:\PhijsAddins\ doesn't seem to be the professional way.
However saving it to C:\Program Files\PhijsAddins\ resulted in the same
problem as the Program files folder is called "Programme" in the German
version and therefore the folder names don't correspond to 100%. How do the
big Corporates handle this problem as they usually use folders such as
C:\Program Files\Oracle\...? Or is there another approach that the Add-in can
be stored in individual folders differing by the user which probably would be
the best solution.

Thanks a lot!

Philipp
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default using a *.xslm add-in with several users


Use the environmental varible UserProfile


Folder = environ("APPData")

This will return the following without a slash at the end.

C:\Documents and Settings\joel\Application Data



So you would want to do this

FName = Folder & "\book1.xla"


To get a list of all the environmental variables do the following

Start - Run
Enter : cmd.exe
In Dos Window type : Set


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=167046

Microsoft Office Help

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default using a *.xslm add-in with several users

Programming in VBA is a bit like an Irish road map - where you have to start
from is not necessarily the best spot. I have had some success with
installing addins to a folder on a central server although there is a slight
performance reduction. The trick is to make sure that once the reference is
set that the path will be the same from any workstation
--
Ken
"Using Dbase dialects since 82"
"Started with Visicalc in the same year"


"phij" wrote:

Hi Dave,

thanks for the quick reply. That solves the Problem. However saving the
add-in to C:\ or C:\PhijsAddins\ doesn't seem to be the professional way.
However saving it to C:\Program Files\PhijsAddins\ resulted in the same
problem as the Program files folder is called "Programme" in the German
version and therefore the folder names don't correspond to 100%. How do the
big Corporates handle this problem as they usually use folders such as
C:\Program Files\Oracle\...? Or is there another approach that the Add-in can
be stored in individual folders differing by the user which probably would be
the best solution.

Thanks a lot!

Philipp



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default using a *.xslm add-in with several users

Testing
--
Ken
"Using Dbase dialects since 82"
"Started with Visicalc in the same year"


"phij" wrote:

Hi Dave,

thanks for the quick reply. That solves the Problem. However saving the
add-in to C:\ or C:\PhijsAddins\ doesn't seem to be the professional way.
However saving it to C:\Program Files\PhijsAddins\ resulted in the same
problem as the Program files folder is called "Programme" in the German
version and therefore the folder names don't correspond to 100%. How do the
big Corporates handle this problem as they usually use folders such as
C:\Program Files\Oracle\...? Or is there another approach that the Add-in can
be stored in individual folders differing by the user which probably would be
the best solution.

Thanks a lot!

Philipp

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default using a *.xslm add-in with several users

I have no idea how big corporate IT departments handle this--but I wouldn't be
surprised if they use the same technique, but use a nicer name:

C:\MonolithInc\Excel\Addins\someaddinhere.xlam

Another (I think more complex) way to avoid the problem is to change the links
each time the workbook opens.

You could tell the user to put the addin in the same folder as the workbook and
use that path in the .changelinks line.

Search google for few examples.

phij wrote:

Hi Dave,

thanks for the quick reply. That solves the Problem. However saving the
add-in to C:\ or C:\PhijsAddins\ doesn't seem to be the professional way.
However saving it to C:\Program Files\PhijsAddins\ resulted in the same
problem as the Program files folder is called "Programme" in the German
version and therefore the folder names don't correspond to 100%. How do the
big Corporates handle this problem as they usually use folders such as
C:\Program Files\Oracle\...? Or is there another approach that the Add-in can
be stored in individual folders differing by the user which probably would be
the best solution.

Thanks a lot!

Philipp


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default using a *.xslm add-in with several users

One thing I bet they do utilize for somethings is a common location for their
addins.

Put their files on:
\\server\sharename\monolithinc\excel\addins\....

Then tell people to access the addin via the UNC path.

Dave Peterson wrote:

I have no idea how big corporate IT departments handle this--but I wouldn't be
surprised if they use the same technique, but use a nicer name:

C:\MonolithInc\Excel\Addins\someaddinhere.xlam

Another (I think more complex) way to avoid the problem is to change the links
each time the workbook opens.

You could tell the user to put the addin in the same folder as the workbook and
use that path in the .changelinks line.

Search google for few examples.

phij wrote:

Hi Dave,

thanks for the quick reply. That solves the Problem. However saving the
add-in to C:\ or C:\PhijsAddins\ doesn't seem to be the professional way.
However saving it to C:\Program Files\PhijsAddins\ resulted in the same
problem as the Program files folder is called "Programme" in the German
version and therefore the folder names don't correspond to 100%. How do the
big Corporates handle this problem as they usually use folders such as
C:\Program Files\Oracle\...? Or is there another approach that the Add-in can
be stored in individual folders differing by the user which probably would be
the best solution.

Thanks a lot!

Philipp


--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default using a *.xslm add-in with several users

I already thought of using the environmental variable. However as it seems
Excel saves the path to functions in add-ins absolute, not relatively in the
file. So the problem is not returning the environmental variable in the VBA
code, but that the second user's Excel can not find the function in the
add-in at all. Even when the add-in is loaded (but saved in another
location). Saving the add-in in the user's folder or the excel standard
folder also returned the same problem.

How is this problem being solved in the standard Excel add-ins Eurotool, or
Solver? Eurovonvert() for example definitely work across different users and
Excel versions (which means different folders of the file)
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default using a *.xslm add-in with several users


Fix the add-in. Post the code if you need help for the add-in.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=167046

Microsoft Office Help



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default using a *.xslm add-in with several users

You will be disappointed at present it is just a function returning the
formula of a cell. However as I said it is supposed to get used across many
users and convenience in installation and use is central.

Public Function FORMELN(Zelle As Range) As String
Application.Volatile True
FORMELN = Application.Text(Zelle.FormulaLocal, "")

End Function

Using .changelinks in combination with the environmental varible
ProgramFiles sounds like a possible solution. However I then run into the
problem of running the function for each new workbook opened. As all code
should be in the add-in, none in the individual files.
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default using a *.xslm add-in with several users

You will be disappointed at present it is just a function returning the
formula of a cell. However as I said it is supposed to get used across many
users and convenience in installation and use is central.

Public Function FORMELN(Zelle As Range) As String
Application.Volatile True
FORMELN = Application.Text(Zelle.FormulaLocal, "")

End Function

Using .changelinks in combination with the environmental varible
ProgramFiles sounds like a possible solution. However I then run into the
problem of running the function for each new workbook opened. As all code
should be in the add-in, none in the individual files.
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default using a *.xslm add-in with several users

I would use a folder with the exact name.



phij wrote:

You will be disappointed at present it is just a function returning the
formula of a cell. However as I said it is supposed to get used across many
users and convenience in installation and use is central.

Public Function FORMELN(Zelle As Range) As String
Application.Volatile True
FORMELN = Application.Text(Zelle.FormulaLocal, "")

End Function

Using .changelinks in combination with the environmental varible
ProgramFiles sounds like a possible solution. However I then run into the
problem of running the function for each new workbook opened. As all code
should be in the add-in, none in the individual files.


--

Dave Peterson
  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default using a *.xslm add-in with several users

Thanks a lot, I guess I'll do that for now.
However a solution therfore would be great for a future version.

Philipp
  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default using a *.xslm add-in with several users

That is the solution I'd use--no matter what version.

phij wrote:

Thanks a lot, I guess I'll do that for now.
However a solution therfore would be great for a future version.

Philipp


--

Dave Peterson
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
sharing excel sheet with multiple users, but other users cant see lana.b Excel Discussion (Misc queries) 3 January 25th 09 11:15 AM
problem while saving the file as .xslm format in excel 2007 soham shah Excel Programming 1 December 18th 08 04:19 PM
maybe by VBE users..... 4pinoy Excel Programming 4 November 12th 06 06:36 AM
prevent users from overwriting other users data [email protected] Excel Worksheet Functions 0 April 17th 05 08:18 PM
Help - Automating a file.. Adding Users , Deleting users, Changing Tim Harding Excel Worksheet Functions 0 March 16th 05 01:25 PM


All times are GMT +1. The time now is 05:13 AM.

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"