Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Private Sub CommandButton1_Click() MsgBox Me.ActiveControl.Name End Sub so ActiveControl returns a reference to the selected control (textbox). However, you must change the TakeFocusOnClick property of the commandbutton to False otherwise ActionControl will refer to the commandbutton itself. -- Regards, Tom Ogilvy "vqthomf" wrote in message ... Hi I have a form with two textboxes and a button that I want to use to paste into the textboxes for another source, I have tried to use gotfocus with the textbox but I can't get it to work can someone please show how I can do this thanks. TIA Charles |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
TextBox focus 4 | Excel Programming | |||
TextBox focus 3 | Excel Programming | |||
TextBox focus | Excel Programming | |||
TextBox Focus | Excel Programming | |||
Which textbox have focus? | Excel Programming |