Command buttons not responding-sticking

L

LuisE

I have a form with 30 command buttons that give a label certain value when
clicked

i.e
Private Sub Chk12_Click()
TxtLabel.Value = "12"
End Sub

The problem arises when sometimes it takes several clicks on the same button
to update the value of the label.

Thanks in advance for your help
 
L

LuisE

Thanks smartin

I know, 30 cmds ais too much but that's how my boss wants it.

Could you please ilustrate the use of DoEvents if possible?
Thanks
 
F

FSt1

hi
sub yoursub()
some code
doevents
more code
doevents
still more code
doevents
maybe some more code
end sub
the doevents keyword turns control over to the operating system to complete
tasks in it's cache. when compled, control reverts back to the macro. in a
way, it's like pausing the macro so the operating system can "keep up".
sometimes you don't want this but sometimes not letting the operating system
perform it's thing causes problems. it's a macro to macro thing so if you are
experencing problems, the doevents may help. but then again maybe not. try it
and see.
can you say the word...troubleshoot?
also.....have you had your boss's IQ check lately?

regards
FSt1
 

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