Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Customer menu Item

Is it possible instead of assigning a macro to a menu item that I can make
it run a code associated directly with the button click instead of in a
module?


Thanx
Todd


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Customer menu Item

Todd,

Buttons on a commandbar do not have a click event. Is that what you are
asking? What are you trying to do?

Doug Glancy

"Todd Huttenstine" wrote in message
...
Is it possible instead of assigning a macro to a menu item that I can make
it run a code associated directly with the button click instead of in a
module?


Thanx
Todd




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Customer menu Item

Yes I want to make a menu item (or button) have its own independant code it
runs) instead of referencing code in another module.

I am trying to come up with an alternate solution of replacing all
components in a workbook that is already open.


"Doug Glancy" wrote in message
...
Todd,

Buttons on a commandbar do not have a click event. Is that what you are
asking? What are you trying to do?

Doug Glancy

"Todd Huttenstine" wrote in message
...
Is it possible instead of assigning a macro to a menu item that I can

make
it run a code associated directly with the button click instead of in a
module?


Thanx
Todd






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Customer menu Item

I think I know what you are after.

If you want to assign a macro to a menu item that you already have created
and linked to a button on a worksheet or form.

To activate a macro from another macro its

Call MacroName

This is what I use for a toolbar button so the code should be something
simualr for a custom menu (Original code came from John Green)

With MD_Control.Controls(1)
'call the macro you want to execute
.OnAction = "MacroName"
'the faceID = button
.FaceId = 65
'Tooltip = label you see when the mouse pointer is over the button
.TooltipText = "Run the Macro"
End With


Sub MacroName
'your caode here
End Sub

"Todd Huttenstine" wrote in message
...
Is it possible instead of assigning a macro to a menu item that I can make
it run a code associated directly with the button click instead of in a
module?


Thanx
Todd




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
windows menu item onzilla Excel Discussion (Misc queries) 1 April 20th 07 06:10 PM
Menu item disabled steven Excel Worksheet Functions 3 July 28th 06 12:59 AM
keep new menu item with workbook Andy G. Excel Discussion (Misc queries) 1 May 16th 06 08:09 PM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
Access menu item from VBS elidag Excel Programming 1 November 13th 03 04:22 PM


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