Automated button click

G

Gregory

Hi

I have a text box on a form. I would like a button that already exists on the form to be "clicked"(sendkeys) as many times as is reflected in the text box

I think this is possible but I haven't been able to make it work

Thanks in advance for your input.....
 
K

Ken Snell

Why click the button? Why not just call the button's OnClick event's
subroutine the number of times you want it to run?

Private Sub txtBoxName_AfterUpdate()
Dim lngCount As Long
For lngCount = 1 to Me.txtBoxName.Value
Call cmdButtonName_Click
Next lngCount
End Sub


--
Ken Snell
<MS ACCESS MVP>

Gregory said:
Hi,

I have a text box on a form. I would like a button that already exists on
the form to be "clicked"(sendkeys) as many times as is reflected in the text
box.
 

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