timer on cmd button

N

Nick T

Hi,
Can i put a timer onto a cmd button?
eg, when clicked me.cmd123.forcolour = vbred then a set time later it will
go 'vbBlue'

I dont want to use the form timer, as i will have various cmb buttons on the
same form, each of which i need to put a different time delay on between
being clicked and changing colour.

is there some vb code i can use for this function as apposed to the form
timer??

Thanks
 
D

Dale Fye

If you want controls on your form to change color based on some time event, I
think you are going to have to use your forms Timer event.

You could do someting like set the Tag property of the command button to the
delay time, then in the Timer Event, check to see whether each of the command
buttons Tag property has a value, and if so, evaluate whether that time is
past and if so, change the appropriate controls color, and then clear the Tag
property.

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 

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