LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determine which commandbar called a function

Hello,

I have been using the following function to change the faceid on a
commandbar button once it has been clicked:

Function ChangeFace()
Dim OldCTRL

Set OldCTRL =
CommandBars("SHOW").Controls(CommandBars.ActionCon trol.Caption)

OldCTRL.FaceId = 1087

OldCTRL.Style = msoButtonIconAndCaptionBelow
End Function

The function is called when each button is clicked.

the line Set OldCTRL = CommandBars("SHOW").Controls
CommandBars.ActionControl.Caption) sets which button on the commandbar named
SHOW called the function.

I would like to be able to capture which commandbar and which button called
the function so I can use the same function from different commandbars.

Something like (pseudo code)
Set OldCTRL =
CommandBars(ActiveCommandBar).Controls(CommandBars .ActionControl.Caption)

Any help is greatly appreciated,
Kevin



 
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
What is this function called?? jPaulB Excel Discussion (Misc queries) 3 August 4th 06 08:33 PM
Custom Function being called when it shouldn't. Ron[_28_] Excel Programming 1 January 18th 05 06:13 PM
XLA function called twice Nigel[_9_] Excel Programming 0 November 16th 04 10:46 AM
Possible to know who has called a function ? Isabelle Robin Excel Programming 3 March 5th 04 12:33 AM
Save Event - Determine if called by code or user David Sedberry Excel Programming 0 October 2nd 03 04:56 PM


All times are GMT +1. The time now is 08:07 AM.

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"