Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How do I display an Excel add in in my Menu

Hello:

I wish to display an add in I developed un my Tools menu?

How do I do that? Your help is appreciated.

Regards,
-Neil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I display an Excel add in in my Menu

I assume you mean when the user does tools=Addins, that your addin is in
the list.

Here are two previous posts from Stephen Bullen on the topic:


From: Stephen Bullen )
Subject: Macro to Automate Excel Add-in
View: Complete Thread (10 articles)
Original Format
Newsgroups: microsoft.public.excel.programming
Date: 1999/07/21

Hi Jenny

I would
like to execute a macro after InstallShield completes the install, to
automatically add the add-in to Excel. I would like the Add-In to be
started each time the user starts Excel?


Instead of starting Excel and running something to install the addin, I
just write the appropriate registry entries within my installation
routine (I use WISE, not InstallShield). For Excel 97, you need to:

1. Locate the registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Ex cel\Microsoft Excel

2. Identify if there is a value with the name "OPEN" (no quotes). If
not, add a new string value with the name "OPEN" (no quotes) and value
of the path path to your addin.

3. If the value "OPEN" already exists, look for "OPEN1", then "OPEN2"
etc. until you find the next available number. Then add that with the
path to your addin.

Regards

Stephen Bullen
Microsoft MVP - Excel
http://www.BMSLtd.co.uk------------------From: Stephen Bullen
)Subject: Install Excel VBA as a addin View:
Complete Thread (2 articles) Original Format Newsgroups:
microsoft.public.excel.programmingDate: 1999/01/27 Hi Niclas,

Has anyone tried (and succeed) to make a VBA program automatically install
as a addin. I intend to use InstallShield to distribute my program. I've
searched the registry but can't find any keys for installed addins.


Yes - all of the self-installing files on my web site set themselves up as
addins (I use WISE). The rule (for Excel 97) is:

Find the registry key:

For XL95:
HKEY_CURRENT_USER\Software\Microsoft\Excel\7.0\Mic rosoft Excel

For XL97:
HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Ex cel\Microsoft Excel

For XL2000
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Ex cel\Options

In there, there is an OPENx item for each addin to be installed, in the
order:
OPEN
OPEN1
OPEN2
OPEN3
etc.

For Excel to see your addin, it must be installed as the next in the
sequence. So, if there are no OPEN items at all, you add the OPEN item. If
there is an OPEN, but no OPEN1, you add it as OPEN1. Otherwise, find the
largest OPENx item and add it as the next one in the sequence.

In each case, the Data is the full path to the addin.


Regards

Stephen Bullen
Microsoft MVP - Excel
http://www.BMSLtd.co.uk--
Regards,
Tom Ogilvy


"Neil Bhandar" wrote in message
...
Hello:

I wish to display an add in I developed un my Tools menu?

How do I do that? Your help is appreciated.

Regards,
-Neil



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default How do I display an Excel add in in my Menu

In addition to Tom's post:


If you mean how to create a menu item on the toolbar "Tools" then you
may use following proc.


Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
doMenu False
End Sub

Private Sub Workbook_Open()
doMenu True
End Sub

Private Sub doMenu(bSet As Boolean)
Dim cCtl As CommandBarControl

Const TAG = "MYADDIN"
Const MNU = "My &Addin"
Const PROC = "module1.procedurename"
Const FACE = 59

On Error Resume Next
With Application.CommandBars
Do
Set cCtl = .FindControl(ID:=0, TAG:=TAG)
If Not cCtl Is Nothing Then cCtl.Delete
Loop Until cCtl Is Nothing
If Not bSet Then Exit Sub
Set cCtl = .FindControl(ID:=30007).Controls.Add( _
Type:=msoControlButton, Temporary:=True)
cCtl.TAG = TAG
cCtl.Caption = MNU
cCtl.OnAction = ThisWorkbook.Name & "!" & PROC
cCtl.FaceId = FACE
End With
End Sub








keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Neil Bhandar" wrote:

Hello:

I wish to display an add in I developed un my Tools menu?

How do I do that? Your help is appreciated.

Regards,
-Neil


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
Automatic Display of ApproveIt Menu upon Excel Opening Bonnie Excel Discussion (Misc queries) 2 May 16th 08 03:30 PM
Option Menu doesn't Display [email protected] Excel Discussion (Misc queries) 1 November 22nd 07 12:36 PM
how do i display menu bar in Excel 2003? Murthy Excel Discussion (Misc queries) 1 May 31st 07 03:09 PM
Menu & tool bars in Excel vanish after using display manager power Sarah K Excel Discussion (Misc queries) 1 March 6th 06 05:50 PM
my excel 2003 has no menu bar. how do I display it? ConfusedEddie Setting up and Configuration of Excel 1 November 3rd 05 09:08 PM


All times are GMT +1. The time now is 10:02 PM.

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

About Us

"It's about Microsoft Excel"