Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This ''solution" didn't work for the end users. I'm developing an .xlt
file. The end users use a copy of the template. When they tab or enter to go to the next textbox or combobox on the worksheet, the object seems to get the focus but the end user can not see it on the worksheet. If the user starts typing the object is updated. Has anyone else seen this type of behavior? Can anyone recommend a way to keep the objects visible when receiving the focus? I don't know how to test if the object actually has the focus. All I know is if you start typing the object shows the text just typed. I'm using textboxes because I need to populate one of them with the an sql statement and I wanted to reduce keystrokes and mouseclicks for the end user. I'm unable to generate consistent results. Sometimes the object "disappears". Sometimes it has diagonal lines through it--at least you can see it--and sometimes the object looks normal with the cursor flashing and ready to accept data. Sometimes when I click the mouse in the object--the cursor isn't shown--I have to click again to get the cursor to show. Here's a sample of code I'm using: Private Sub ComboBox2_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) ''' Check if the TAB or ENTER key was pressed. If KeyCode = vbKeyTab Or KeyCode = vbKeyReturn Then ''' If this is Excel 97 you must select a cell ''' before attempting to activate another control. If Val(Application.Version) < 9 Then Me.Range("A1").Select End If ''' Move the focus appropriately. If CBool(Shift And 1) Then ''' The user was holding down the SHIFT key ''' move back to the previous control. TextBox2.Activate Else ''' Move to the next control. TextBox4.Activate Application.Calculate End If End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textbox disappears from Excel paste into PowerPoint | Charts and Charting in Excel | |||
Textbox disappears in large chart-Excel bug? | Excel Discussion (Misc queries) | |||
Textbox disappears | Charts and Charting in Excel | |||
textbox scrollbar disappears | Excel Discussion (Misc queries) | |||
Excel VBA - Cursor disappears when validating content of a TextBox | Excel Programming |