Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default Cell context menu in XL2007

As I understand from various postings in this forum, we can not create
any custom toolbars or icons in xl2007.
But Is it possible to add custom icon to run a macro in cell context
menu (cell right click menu) by a add-in in VB6?
If yes pl point me to a sample code if available.

I am trying to make com addin in vb6 with help of example on Chip's
site and need to provide a button in rightclick menu to users for
accessing the code.

Regards,
Madiya
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default Cell context menu in XL2007

See this page for example code
http://www.ozgrid.com/VBA/right-click.htm



--
Regards
Dave Hawley
www.ozgrid.com
"Madiya" wrote in message
...
As I understand from various postings in this forum, we can not create
any custom toolbars or icons in xl2007.
But Is it possible to add custom icon to run a macro in cell context
menu (cell right click menu) by a add-in in VB6?
If yes pl point me to a sample code if available.

I am trying to make com addin in vb6 with help of example on Chip's
site and need to provide a button in rightclick menu to users for
accessing the code.

Regards,
Madiya


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default Cell context menu in XL2007

On May 4, 12:07*pm, "ozgrid.com" wrote:
See this page for example codehttp://www.ozgrid.com/VBA/right-click.htm

--
Regards
Dave Hawleywww.ozgrid.com"Madiya" wrote in message

...



As I understand from various postings in this forum, we can not create
any custom toolbars or icons in xl2007.
But Is it possible to add custom icon to run a macro in cell context
menu (cell right click menu) by a add-in in VB6?
If yes pl point me to a sample code if available.


I am trying to make com addin in vb6 with help of example on Chip's
site and need to provide a button in rightclick menu to users for
accessing the code.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Well, Thanks.
I know this part of code.
I requested sample code for use in com add-in.
I have tried saveral combinations but com add-in is not creating the
custom button in the cell right click menu.
However, all the functions in the same add-in as provided by chip
works fine.

Regards,
Madiya
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default Cell context menu in XL2007

Madiya,

Can you post the COM addin code, just the necessary implementation code and
the menu code?

--

HTH

Bob

"Madiya" wrote in message
...
On May 4, 12:07 pm, "ozgrid.com" wrote:
See this page for example codehttp://www.ozgrid.com/VBA/right-click.htm

--
Regards
Dave Hawleywww.ozgrid.com"Madiya" wrote in message

...



As I understand from various postings in this forum, we can not create
any custom toolbars or icons in xl2007.
But Is it possible to add custom icon to run a macro in cell context
menu (cell right click menu) by a add-in in VB6?
If yes pl point me to a sample code if available.


I am trying to make com addin in vb6 with help of example on Chip's
site and need to provide a button in rightclick menu to users for
accessing the code.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Well, Thanks.
I know this part of code.
I requested sample code for use in com add-in.
I have tried saveral combinations but com add-in is not creating the
custom button in the cell right click menu.
However, all the functions in the same add-in as provided by chip
works fine.

Regards,
Madiya


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default Cell context menu in XL2007

On May 4, 2:34*pm, "Bob Phillips" wrote:
Madiya,

Can you post the COM addin code, just the necessary implementation code and
the menu code?

--

HTH

Bob

"Madiya" wrote in message

...
On May 4, 12:07 pm, "ozgrid.com" wrote:





See this page for example codehttp://www.ozgrid.com/VBA/right-click.htm


--
Regards
Dave Hawleywww.ozgrid.com"Madiya" wrote in message


...


As I understand from various postings in this forum, we can not create
any custom toolbars or icons in xl2007.
But Is it possible to add custom icon to run a macro in cell context
menu (cell right click menu) by a add-in in VB6?
If yes pl point me to a sample code if available.


I am trying to make com addin in vb6 with help of example on Chip's
site and need to provide a button in rightclick menu to users for
accessing the code.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Well, Thanks.
I know this part of code.
I requested sample code for use in com add-in.
I have tried saveral combinations but com add-in is not creating the
custom button in the cell right click menu.
However, all the functions in the same add-in *as provided by chip
works fine.

Regards,
Madiya- Hide quoted text -

- Show quoted text -


Sure. Here it is.

Connectexcel class module :
'FROM
'http://www.cpearson.com/Excel/CreatingCOMAddIn.aspx

'REFERANCES REQUIRED FOR THIS ADDIN
'C:\Program Files\Common Files\microsoft shared\OFFICE11\MSO.DLL
'C:\Program Files\Office2003\OFFICE11\EXCEL.EXE
'C:\Program Files\Common Files\Designer\MSADDNDR.DLL

Option Explicit
Implements AddInDesignerObjects.IDTExtensibility2


Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
' not used but required by Implements.
End Sub

Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
' not used but required by Implements.
End Sub

Private Sub IDTExtensibility2_OnConnection(ByVal Application As
Object, _
ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
ByVal AddInInst As Object, custom() As Variant)
''''''''''''''''''''''''''''''
' Called automaticaly when Excel loads the CAI.
''''''''''''''''''''''''''''''
Set XL = Application
Set ThisCAI = AddInInst
Set ExcelEvents = New CExcelEvents
End Sub

Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As
AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
''''''''''''''''''''''''''''''
' Called automaticaly when Excel unloads the CAI.
''''''''''''''''''''''''''''''
Set XL = Nothing
Set ThisCAI = Nothing
Set ExcelEvents = Nothing
End Sub

Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
' not used but required by Implements.
End Sub

In Cexcelevents class module ;
Private Sub SetupControls()
'''''''''''''''''''''''''''''''''''''''''''''''''' ''
' Setup one control. Repeat this code for all other
' user interface elements.
'''''''''''''''''''''''''''''''''''''''''''''''''' ''

'Set pMenuItem1 = XLApp.CommandBars("CELL").Controls.Add( _
' Type:=msoControlButton, Temporary:=True)
With XLApp.CommandBars("Cell").Controls.Add
With .Add(Temporary:=True)
'With pMenuItem1
.Caption = "excel GSM"
.OnAction = "excel GSM"
.Tag = excelGSM
'.BeginGroup = True
End With
End With
pControlsColl.Add pMenuItem1

End Sub

Private Sub pMenuItem1_Click(ByVal Ctrl As Office.CommandBarButton,
CancelDefault As Boolean)
MsgBox "Menu Item Click From Excel COM Add In"
End Sub


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default Cell context menu in XL2007

On May 4, 2:48*pm, Madiya wrote:
On May 4, 2:34*pm, "Bob Phillips" wrote:





Madiya,


Can you post the COM addin code, just the necessary implementation code and
the menu code?


--


HTH


Bob


"Madiya" wrote in message


...
On May 4, 12:07 pm, "ozgrid.com" wrote:


See this page for example codehttp://www.ozgrid.com/VBA/right-click.htm


--
Regards
Dave Hawleywww.ozgrid.com"Madiya" wrote in message


....


As I understand from various postings in this forum, we can not create
any custom toolbars or icons in xl2007.
But Is it possible to add custom icon to run a macro in cell context
menu (cell right click menu) by a add-in in VB6?
If yes pl point me to a sample code if available.


I am trying to make com addin in vb6 with help of example on Chip's
site and need to provide a button in rightclick menu to users for
accessing the code.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Well, Thanks.
I know this part of code.
I requested sample code for use in com add-in.
I have tried saveral combinations but com add-in is not creating the
custom button in the cell right click menu.
However, all the functions in the same add-in *as provided by chip
works fine.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Sure. Here it is.

Connectexcel class module :
'FROM
'http://www.cpearson.com/Excel/CreatingCOMAddIn.aspx

'REFERANCES REQUIRED FOR THIS ADDIN
'C:\Program Files\Common Files\microsoft shared\OFFICE11\MSO.DLL
'C:\Program Files\Office2003\OFFICE11\EXCEL.EXE
'C:\Program Files\Common Files\Designer\MSADDNDR.DLL

Option Explicit
Implements AddInDesignerObjects.IDTExtensibility2

Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
' not used but required by Implements.
End Sub

Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
' not used but required by Implements.
End Sub

Private Sub IDTExtensibility2_OnConnection(ByVal Application As
Object, _
* * ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
* * ByVal AddInInst As Object, custom() As Variant)
* * ''''''''''''''''''''''''''''''
* * ' Called automaticaly when Excel loads the CAI.
* * ''''''''''''''''''''''''''''''
* * Set XL = Application
* * Set ThisCAI = AddInInst
* * Set ExcelEvents = New CExcelEvents
End Sub

Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As
AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
* * ''''''''''''''''''''''''''''''
* * ' Called automaticaly when Excel unloads the CAI.
* * ''''''''''''''''''''''''''''''
* * Set XL = Nothing
* * Set ThisCAI = Nothing
* * Set ExcelEvents = Nothing
End Sub

Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
' not used but required by Implements.
End Sub

In Cexcelevents class module ;
Private Sub SetupControls()
* * '''''''''''''''''''''''''''''''''''''''''''''''''' ''
* * ' Setup one control. Repeat this code for all other
* * ' user interface elements.
* * '''''''''''''''''''''''''''''''''''''''''''''''''' ''

'Set pMenuItem1 = XLApp.CommandBars("CELL").Controls.Add( _
' * * * *Type:=msoControlButton, Temporary:=True)
With XLApp.CommandBars("Cell").Controls.Add
* * * *With .Add(Temporary:=True)
* * * * 'With pMenuItem1
* * * * .Caption = "excel GSM"
* * * * .OnAction = "excel GSM"
* * * * .Tag = excelGSM
* * * * '.BeginGroup = True
* * End With
End With
pControlsColl.Add pMenuItem1

End Sub

Private Sub pMenuItem1_Click(ByVal Ctrl As Office.CommandBarButton,
CancelDefault As Boolean)
* * MsgBox "Menu Item Click From Excel COM Add In"
End Sub- Hide quoted text -

- Show quoted text -


Pl help.
Madiya
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
Trouble with modifying cell right-mouse-click context menu jlwilloz Excel Programming 2 March 13th 10 01:14 AM
Create a callout box/Context menu for a cell Excel Monkey[_2_] Excel Programming 0 April 14th 09 06:06 PM
[Excel '03] check-box menu items and cell context menus don't disp Jack Hoxley [MVP] Excel Programming 5 May 2nd 08 05:08 PM
Add item to 'Cell' context menu with XML (RibbonX) Vincent_6636 Excel Programming 2 June 11th 07 12:49 AM
Context menu of Cell MadDog Excel Programming 2 March 4th 06 10:30 AM


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