Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
focus
Hi
I've got a form from which my users will select files. If they double click a text box, the open file dialog will appear and they can choose their file. The problem is that after they select their file they need to click out of the text box before any other control will respond. For example, there's a button that basically says "okay get the file". If I select a file, and then hit the button -- I have to hit the button twice. OR if I select a file, go to another text box to get a different type of file, I have to click that other text box before it will hear the double click Any suggestions Art |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
focus
Art,
You can give the "Okay, get the file" button the focus with the SetFocus method: Private Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean) TextBox1.Value = Application.GetOpenFilename OkayGetTheFileButton.SetFocus Now the text box no longer has focus, so any button can be clicked, and the Enter key can also be used for button OkayGetTheFileButton, since it has focus. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Art" wrote in message ... Hi, I've got a form from which my users will select files. If they double click a text box, the open file dialog will appear and they can choose their file. The problem is that after they select their file they need to click out of the text box before any other control will respond. For example, there's a button that basically says "okay get the file". If I select a file, and then hit the button -- I have to hit the button twice. OR if I select a file, go to another text box to get a different type of file, I have to click that other text box before it will hear the double click. Any suggestions? Art |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
focus | Excel Discussion (Misc queries) | |||
set focus | Excel Discussion (Misc queries) | |||
Set Focus | Excel Programming | |||
How do I set focus | Excel Programming | |||
set focus | Excel Programming |