#1
|
|||
|
|||
Userform control SETFOCUS being ignored
I'm trying everything and I can't do the SETFOCUS works it's totally ignored. The only workaround I found is to play with tabindex, using beforeupdate to change the tabindex so correct control is focused after exiting a control. Thanks.
__________________
Backup your original file before doing any modification. |
#2
|
|||
|
|||
What event are you using to try to setfocus? If you are exiting a textbox and a frame at the same time then the textbox onExit is ignored. Use the frame on exit
|
#3
|
|||
|
|||
Hi!
I'm using Textbox before update (also tried with exit and afterupdate): This works: Code:
If FindInt = 1 Then With CB1 .TabIndex = 3 .SetFocus .DropDown End With End If CB1 is a combobox. All those controls are in page1 of a multipage (2 pages) word vba userform, everything else works fine. Thanks
__________________
Backup your original file before doing any modification. |
#4
|
|||
|
|||
Can you post your document with form and code
|
#5
|
|||
|
|||
Hi! I can't.
But I was able to reproduce the problem with a new userform 4 text box and 1 combobox. Textbox1 exit Combobox.setfocus does not works (this textbox1 and the combobox are not in sequence in tabindex).
__________________
Backup your original file before doing any modification. |
#6
|
|||
|
|||
Googling about this problem, I saw similiar problem post elsewhere.
I will not take too much of your time, since I already have a workaround. Thanks.
__________________
Backup your original file before doing any modification. Last edited by eduzs; 09-26-2020 at 09:25 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Not changing a content control if re-entered and Userform pops up. | ashbee | Word VBA | 3 | 01-26-2020 11:58 AM |
SetFocus command being ignored | jrooney7 | Word VBA | 4 | 03-28-2019 07:13 AM |
Show Userform when Content Control CheckBox ticked | derajlance | Word VBA | 1 | 05-13-2016 01:55 PM |
Change parent for control from frame to userForm? | Cosmo | Word VBA | 0 | 05-30-2014 02:19 PM |
.setfocus not working why? | Cbrehm | Excel Programming | 0 | 05-11-2011 02:52 AM |