Results 1 to 13 of 13
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to distribute a self-made add-in?

    Hi,

    I made an Excel 97 add-in and a hlp Help-file. I want to distribute this throughout the company, for every Excel user. Both files should be put in the directory crogram filesmicrosoft officeofficelibrary where Excel looks for available add-ins at startup.
    Does anyone know how to make a installation procedure that does this? I mean, ideal should be if I could send around an "executable" file that starts an installation wizard that does the job. As an extra, if the add-in could become checked at the same time, this would be wonderful.
    I don't expect you to come up with complete procedures, but it would be very much appreciated if you could give me some hints or references where I can find information on that.

  2. #2
    Star Lounger
    Join Date
    Feb 2001
    Location
    Auckland, North Island, New Zealand
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    Would you mind telling me how you created the add-in and hlp files as I have some user-defined functions I would like to distribute as an addin

    thanks

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    How you create an addin varies between versions of Excel. For Excel 97 & 2000 you create a workbook write the addin VBA code. Then you switch to the spreadsheet window for that workbook (not the VBA Editor window), and do a File | Save As. In the Save As dialog box, select addin from the "Save as file of type" drop down list (it should be the last item in the list). Type in your addin file name and save the file.

    For earlier versions, I think it was a menu item on the "Tools" menu in the VBA Editor window, but I am not sure I am remembering correctly.
    Legare Coleman

  4. #4
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    There are a few things which are worthwhile considering before you save your project as an xla-file (= add-in).
    First, in the VBE (Visual Basic Editor), in the project explorer, right-click the VBAproject and go to the protection tab. Lock your project for viewing and fill in and confirm your password. This will protect your add-in code from being viewed by other people.
    Second, goto File >> properties in the Excel environment and fill in a Title and Comments. The title will appear in the add-in available list when you select Tools >> Add-ins. The comment will appear in the comment box. Of course, you need to place your xla-file in the directory where Excel looks for add-ins at startup. This is e.g. crogram filesmicrosoft officeofficelibrary for Excel 97.

  5. #5
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    Just want to add that you have to select the properties of the VBAproject before going to the protection tab (sorry for this..)
    About making hlp files, this is a little more complicated to explain, but I used the Microsoft Help Workshop to do it. Here you have some information on it:

    Help Workshop is a program that you use to create Help (.hlp) files, edit project and contents files, and test and report on help files. Help Workshop takes the information in the project (.hpj) file to combine the topic (.rtf) files (which can be made in Word), bitmaps, and other sources into one Help file that can be viewed using the Microsoft Windows Help program.

    Help Workshop

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How to distribute a self-made add-in?

    I would use a dos batch file (*.BAT) or the NT equivalent (*.cmd) to copy the file from a common directory to each user's directory. This file might be called from the logon script.

    How well this works depends on whether your workstations are all set up the same.
    David Grugeon
    Brisbane Australia

  7. #7
    New Lounger
    Join Date
    Jan 2001
    Location
    Tullahoma, Tennessee, USA
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    Have you considered using WinZip to zip and create an executable? When zipping, specify to recurse folders. Then from the Action menu select "Create .exe file".

    You can then email the file to your coworkers and when they unzip it will go into their respective Office directories.

  8. #8
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    The url is: www.setupspecialist.com
    I tried to make a direct link using the href html-command, but that didn't work. I often see people displaying links but I don't know how to do this. Can someone help me with this?

  9. #9
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    Using the <IMG SRC=http://www.wopr.com/w3timages/url1.gif> button from the 'Click tag panel' will give you this:

    [ url ]link[ /url ]

    Delete the word 'link' and replace with the full url:

    [ url ]http://www.setupspecialist.com[ /url ]

    and you should get:

    <A target="_blank" HREF=http://www.setupspecialist.com>http://www.setupspecialist.com</A>

    **

    (I added spaces around the '[' + ']' characters to prevent the tags working)

  10. #10
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    *** Geoff W. I've added the markup tags- Leif's response shows you how ****
    Hi,

    I've got the url of an interesting website:
    <A target="_blank" HREF=http://www.setupspecialist.com>click here</A>
    There you can find software that enables you to distribute your files and programs via a setup wizard. A free trial version can be downloaded.
    Thanks to all of you for your suggestions.

  11. #11
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    Hi HP,

    <<Does anyone know how to make a installation procedure that does this? >>

    What I did was create an excel workbook with the following code in it:

    Option Explicit
    Dim vReply As Variant
    Dim AddInLibPath As String
    Dim CurAddInPath As String

    Sub Setup()
    Dim vReply As Variant
    Dim AddInLibPath As String
    Dim CurAddInPath As String
    vReply = MsgBox("This will install YourAppsName" & vbNewLine & _
    "in your default Add-in directory." & vbNewLine & vbNewLine & "Proceed?", vbYesNo, "YourAppsName Setup")
    If vReply = vbYes Then
    On Error Resume Next
    Workbooks("YourAppsName.xla").Close False

    CurAddInPath = ThisWorkbook.Path & "YourAppsName.xla"
    AddInLibPath = Application.LibraryPath & "YourAppsName.xla"
    On Error Resume Next
    FileCopy CurAddInPath, AddInLibPath
    If Err.Number <> 0 Then
    SomeThingWrong
    Exit Sub
    End If
    With AddIns.Add(FileName:=AddInLibPath)
    .Installed = True
    End With
    Else
    vReply = MsgBox(prompt:="Install Cancelled", Buttons:=vbOKOnly, Title:="YourAppsName Setup")
    End If
    End Sub
    Sub SomeThingWrong()
    vReply = MsgBox(prompt:="Something went wrong during copying" & vbNewLine _
    & "of the add-in to your add-in directory:" _
    & vbNewLine & vbNewLine & Application.LibraryPath & "" _
    & vbNewLine & vbNewLine & "You can install YourAppsName manually by copying the file" _
    & vbNewLine & "YourAppsName.xla to this directory yourself and installing the addin" _
    & vbNewLine & "using Tools, Addins from the menu of Excel." _
    & vbNewLine & vbNewLine & "Don't press OK yet, first do the copying from Windows Explorer." _
    & vbNewLine & "It gives you the opportunity to ALT-TAB back to Excel" _
    & vbNewLine & "to read this text.", Buttons:=vbOKOnly, Title:="Autosafe Setup")
    End Sub

    Regards,

    Jan Karel Pieterse
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  12. #12
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    Thanks Jan Karel,

    But suppose you want to distribute your add-in via the mail? The most easy way to let another user install your add-in is just telling the person who receives the add-in and help file to which directory he or she should detach these files (e.g. to crogram filesmicrosoft officeoffice library, which is the directory where Excel looks for available add-ins at start-up). Then of course, after launching Excel, the user still has to check the checkbox next to the add-in in the available add-ins list (access via Tools >> Add-ins). Of course, this doesn't look very professional.

    Thanks again, or as they say in Dutch: reuze bedankt!!

  13. #13
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to distribute a self-made add-in?

    Hi Hans,

    <<But suppose you want to distribute your add-in via the mail? The most easy way to let another user install your add-in is just telling the person who receives the add-in and help file to which directory he or she should detach these files (e.g. to crogram filesmicrosoft officeoffice library,>>


    The code I wrote considers the fact, that international versions of Excel use different pathnames for storage of Add-ins (English: "...Library", Dutch: "...Biblio". As the Add-in I produced this code for is International, I had to do more than just write "please copy this and that file to to crogram filesmicrosoft officeofficelibrary"

    <<Then of course, after launching Excel, the user still has to check the checkbox next to the add-in in the available add-ins list (access via Tools >> Add-ins).>>

    The code I provided "checks" that itself.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •