ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Command button icons when disabled (https://www.excelbanter.com/excel-programming/431934-command-button-icons-when-disabled.html)

DocBrown

Command button icons when disabled
 
I have three buttons on my worksheet. Under certain conditions (controlled by
macros), I set enable=true/false to enable/disable the buttons. I want to
make small buttons with icons. How do i make the icons 'grey out' to indicate
disabled?

Also, If I use icons on the buttons, how do I include the icons with the
workbook so the user doesn't have to have the *.ico files on their computer?
Or does that happen in some other fashion?

Thanks,
John


DocBrown

Command button icons when disabled
 
For those that are interested... I figured out a way.

I created a form and added buttons. For each command on my main form, I
created two buttons. On one button I put in the picture property the
'enabled' state and on the other I put the 'disabled' state.

Then in code I do the following:

'To disable
Sheet2.cmdCopyTmpl.Enabled = False
Sheet2.cmdCopyTmpl.Picture = frmButtonImages.imgCopyTmplDisable.Picture

' to enable
Sheet2.cmdCopyTmpl.Enabled = True
Sheet2.cmdCopyTmpl.Picture = frmButtonImages.imgCopyTmplEnable.Picture


"DocBrown" wrote:

I have three buttons on my worksheet. Under certain conditions (controlled by
macros), I set enable=true/false to enable/disable the buttons. I want to
make small buttons with icons. How do i make the icons 'grey out' to indicate
disabled?

Also, If I use icons on the buttons, how do I include the icons with the
workbook so the user doesn't have to have the *.ico files on their computer?
Or does that happen in some other fashion?

Thanks,
John



All times are GMT +1. The time now is 01:29 AM.

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