Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I Add an Addin to Toolbar


If I have an excel addin stored on a lan, is it possible to send
everyone at work a workbook with a macro in it, or is there easy way of
creating an exe, so that the excel addin is set up automatically in
their standard toolbar permanently (Eg the same menu as file, edit
etc.)

Thanks


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How do I Add an Addin to Toolbar

I think the below code will acomplish part of your goal.
You wont be able to send it through E-mail in a file but
you can put this in a Workbook that is in the same
directory than the AddIn and call it install.xls or
similar you can instruct your users to launch it from that
directory. It should properly install the AddIn from that
location in the users Add-In selection. It will also
address the issue of the network location beeing a
different drive for different users.

Public Sub Auto_Open()
Dim MyAddIn As AddIn
Dim MyAddInName As String
Dim TempName
Dim i As Integer
Dim StartFolder As String

'Change this to your Add-ins file name
MyAddInName = "My Add-In.xla"
On Error GoTo ErrorMsg

If CInt(Application.Version) < 9 Then
MsgBox "This Add-In is designed for Excel 2000 or
higher, and cannot be installed with this Version of
Excel.", 48
Application.Quit
End If

For i = 1 To AddIns.Count
If InStr(1, AddIns(i).Name, MyAddInName,
vbTextCompare) 0 Then
If AddIns(i).Installed = True Then
TempName = AddIns(i).Title
GoTo TheEnd
End If
End If
Next

StartFolder = ThisWorkbook.Path
StartFolder = StartFolder + "\" + MyAddInName
Set MyAddIn = AddIns.Add(Filename:=StartFolder,
CopyFile:=False)
TempName = MyAddIn.Title
MyAddIn.Installed = True

TheEnd:
MsgBox TempName + " has been installed successfully,
select OK to finish.", 64
Application.Quit
Exit Sub

ErrorMsg:
MsgBox "Sorry, an Error occured during the
installation.", 48
Application.Quit

End Sub
-----Original Message-----

If I have an excel addin stored on a lan, is it possible

to send
everyone at work a workbook with a macro in it, or is

there easy way of
creating an exe, so that the excel addin is set up

automatically in
their standard toolbar permanently (Eg the same menu as

file, edit
etc.)

Thanks


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

.

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
toolbar addin for tabs BorisS Excel Discussion (Misc queries) 2 December 1st 06 02:28 AM
toolbar addin for tabs Mike Rogers Excel Discussion (Misc queries) 0 November 29th 06 05:25 PM
toolbar addin for tabs BorisS Excel Discussion (Misc queries) 0 November 29th 06 04:43 PM
toolbar addin for tabs Mike Rogers Excel Discussion (Misc queries) 0 November 29th 06 03:52 PM
saving toolbar buttons on custom toolbar Paul James Excel Programming 12 August 6th 03 08:28 AM


All times are GMT +1. The time now is 10:26 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"