Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Assign a Ribbon Control's Label from a Variable in VBA Code

Hi, everyone. I have a very simple question.
As the subject indicates, how do I assign a ribbon control's label from a
variable in VBA Code?
for example, I have a button declared as:

<button id="Btn1" label="My button" onAction="File.xls!MyButtonAction"/

but instead, I want to get the label from the VBA code declared as:

Public Const Btn1Label As String = "My button"

Thanks in advance. :)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Assign a Ribbon Control's Label from a Variable in VBA Code

Hi jean grey

Why not use Get Label, see
http://www.rondebruin.nl/dynamic.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"jean grey" wrote in message ...
Hi, everyone. I have a very simple question.
As the subject indicates, how do I assign a ribbon control's label from a
variable in VBA Code?
for example, I have a button declared as:

<button id="Btn1" label="My button" onAction="File.xls!MyButtonAction"/

but instead, I want to get the label from the VBA code declared as:

Public Const Btn1Label As String = "My button"

Thanks in advance. :)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Assign a Ribbon Control's Label from a Variable in VBA Code

I don't think that you can, the controls are not exposed. But the callback
is invoked when the button is clicked, so you action it there.

What are you trying to do?

--
__________________________________
HTH

Bob

"jean grey" wrote in message
...
Hi, everyone. I have a very simple question.
As the subject indicates, how do I assign a ribbon control's label from a
variable in VBA Code?
for example, I have a button declared as:

<button id="Btn1" label="My button" onAction="File.xls!MyButtonAction"/

but instead, I want to get the label from the VBA code declared as:

Public Const Btn1Label As String = "My button"

Thanks in advance. :)



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Assign a Ribbon Control's Label from a Variable in VBA Code

Thanks, Ron. That was what I needed. :)

"Ron de Bruin" wrote:

Hi jean grey

Why not use Get Label, see
http://www.rondebruin.nl/dynamic.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"jean grey" wrote in message ...
Hi, everyone. I have a very simple question.
As the subject indicates, how do I assign a ribbon control's label from a
variable in VBA Code?
for example, I have a button declared as:

<button id="Btn1" label="My button" onAction="File.xls!MyButtonAction"/

but instead, I want to get the label from the VBA code declared as:

Public Const Btn1Label As String = "My button"

Thanks in advance. :)


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
Assign custom number format to the ribbon Louis Wilson Excel Discussion (Misc queries) 0 June 24th 09 05:41 PM
Splitting up code ribbon 3e Excel Discussion (Misc queries) 2 June 19th 08 02:07 PM
Alter ribbon button label on the fly? XP Excel Programming 2 April 29th 08 01:29 PM
How can I make Excel read a value from a textfile and assign it to a variable in my VBA code?? haakon Excel Programming 2 February 28th 07 09:21 AM
[Q] Save As throws type mismatch error in control's code? Jason Weiss Excel Discussion (Misc queries) 1 July 16th 05 04:21 AM


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