Thread: [Solved] Find textbox name
View Single Post
 
Old 01-31-2014, 07:15 AM
Hdata Hdata is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Jan 2014
Posts: 26
Hdata is on a distinguished road
Default

I created a command button on the userform and attached the code below:

Code:
 
Private Sub cmdTextBoxName_Enter()
MsgBox Me.ActiveControl.Name
End Sub
What I received back was
"cmdTextBoxName"

The name of the textbox is actually "Document_City"
What am I missing?
Thank you for your response

Hdata
Reply With Quote