Textbox1_Click; Do we have textbox1_click on Userform?

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, do we have textbox1_click on Userform?
I'm trying to do something on textbox click [if this is possible to triger macro in single click...]

Thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Well the short answer is no, there isn't a Click event.

You can find all the events of any control by selecting it from the left dropdown in the userform module code window, then looking at the list in the right dropdown.
 
Upvote 0
Norie, thanks for confirming...At times, even when i dont see things there...happens tp be there...so...:)


Thanks again!
 
Upvote 0
You can use the MouseDown event as follows :

Code:
Private Sub TextBox1_MouseDown _
(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    If Button = 1 Then MsgBox "hello!"
End Sub
 
Upvote 0
Jaafar Tribak, the other I was in rush and forgot to come back to get this...
Jaafar, thanks for helping...thanks for the workaround!
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top