ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Alter ribbon button label on the fly? (https://www.excelbanter.com/excel-programming/410121-alter-ribbon-button-label-fly.html)

XP

Alter ribbon button label on the fly?
 
I have a custom ribbon with a date button, a Fund dropdown, and an import
button.

When the user clicks the "Date" button, I have an input box open in which
the user enters a date (the date is validated using VBA under the covers). I
would like the date entered by the user to then appear in the label of the
"Date" button. So when a date has been selected, the "Date" button will
appear as: Date: 04-28-2008

Can this be done? If so, could someone please post generic example code that
does it?

FYI, the next step will be to capture the date stored in the label (right
10) and run an import based on that date and the selected Fund selected in
the dropdown.

Thanks much in advance.

Bob Phillips

Alter ribbon button label on the fly?
 
If you are referring to Excel 2007, it can't be done yet. Whether it will in
future is debatable, but not now.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"XP" wrote in message
...
I have a custom ribbon with a date button, a Fund dropdown, and an import
button.

When the user clicks the "Date" button, I have an input box open in which
the user enters a date (the date is validated using VBA under the covers).
I
would like the date entered by the user to then appear in the label of the
"Date" button. So when a date has been selected, the "Date" button will
appear as: Date: 04-28-2008

Can this be done? If so, could someone please post generic example code
that
does it?

FYI, the next step will be to capture the date stored in the label (right
10) and run an import based on that date and the selected Fund selected in
the dropdown.

Thanks much in advance.




Jim Rech[_2_]

Alter ribbon button label on the fly?
 
You should use Outlook Express or another real newsreader. The attachment is
right there. Web interfaces block it I gather.

If you send me an email I'll send it to you. jrrechAThotmail.com

--
Jim
"XP" wrote in message
...
Hi Jim,

Your attachment did not come through?

"Jim Rech" wrote:

Actually it's pretty straightforward to dynamically change button text,
if I
understand what you want correctly. See attached.

--
Jim
"XP" wrote in message
...
|I have a custom ribbon with a date button, a Fund dropdown, and an
import
| button.
|
| When the user clicks the "Date" button, I have an input box open in
which
| the user enters a date (the date is validated using VBA under the
covers).
I
| would like the date entered by the user to then appear in the label of
the
| "Date" button. So when a date has been selected, the "Date" button will
| appear as: Date: 04-28-2008
|
| Can this be done? If so, could someone please post generic example code
that
| does it?
|
| FYI, the next step will be to capture the date stored in the label
(right
| 10) and run an import based on that date and the selected Fund selected
in
| the dropdown.
|
| Thanks much in advance





All times are GMT +1. The time now is 10:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com