Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
textbox insertion point.
In Userform1.TextBox1 I enter text normally. I can also insert pre-defined
strings by clicking on a combobox in the same Userform. After the code runs to insert the predefined strings, the cursor does not show in the textbox. I can obviously click in the box to make it appear; however, it would be nice to have the insertion point visible when the code to insert the string is finished running. I've tried SetFocus and SelStart, but they don't do it. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
textbox insertion point.
I have had the same problem for a long time, and your post prompted me to
finally do something about it. It looks like the problem is that the userform has lost the focus. I just got mine to work as intended by adding an AppActivate command before the TextBox.SetFocus command. For example: 'Put the contents of the selected cell in the Pinyin form textbox. frmPinyin.txtInput.Text = ActiveCell.FormulaR1C1 AppActivate "Pinyin Input", True frmPinyin.txtInput.SetFocus In this example "Pinyin Input" is the title of my userform, and txtInput is the name of the textbox. Hope this helps, Hutch "Bert" wrote: In Userform1.TextBox1 I enter text normally. I can also insert pre-defined strings by clicking on a combobox in the same Userform. After the code runs to insert the predefined strings, the cursor does not show in the textbox. I can obviously click in the box to make it appear; however, it would be nice to have the insertion point visible when the code to insert the string is finished running. I've tried SetFocus and SelStart, but they don't do it. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change Insertion Point | Excel Discussion (Misc queries) | |||
find textbox insertion point | Excel Programming | |||
how to change the insertion point color? | Excel Worksheet Functions | |||
causing macros to run at insertion point | Excel Worksheet Functions | |||
Positioning the Insertion Point in a TextBox | Excel Programming |