Command button icons when disabled

D

DocBrown

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
 
D

DocBrown

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top