Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I hope someone out there can help me. I have a modeless Form. It has 1 label and one textbox. on exit of the textbox(by user hitting enter) It looses it focus t Excel. However When I give focus back to the userform b AppActivate(userform1.caption) Textbox1 has the focus, However ther is no cursor indication and I can not overwrite what is currently i the field, it only appears to allow me to backspace over the previou entry. Here is the code I am using : Module 1 -- code: Sub ShowUserForm() If UserForm1.Visible = True Then AppActivate (UserForm1.Caption) Else UserForm1.Show (vbModeless) End If End Sub UserForm1 -- code: Private Sub TextBox1_Enter() Me.TextBox1.BackColor = &HFFFF& End Sub Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) Cancel = True Me.TextBox1.BackColor = &H80000005 AppActivate ("Microsoft excel") End Sub Private Sub UserForm_Activate() Me.TextBox1.SetFocus End Sub *** note Ive had a little bit of success with the userform_click even and adding a second text box, But I dont want the user to click on th body of the userform to set the focus. PLEASE PLEASE HELP!! -- ThinkImInTroublePosted from http://www.pcreview.co.uk/ newsgroup acces |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I switch focus from a modeless user form back to the excel. | Excel Programming | |||
Modeless User Form and Worksheet Focus | Excel Programming | |||
Removing focus from a Modeless Form? | Excel Programming | |||
Modeless but waiting form | Excel Programming | |||
Focus back from modeless userform to sheet | Excel Programming |