Can't get cursor to appear in textbox 
Author Message
 Can't get cursor to appear in textbox

I'm really at a loss here...

Load UserForm1
UserForm1.TextBox1.SetFocus
UserForm1.Show

The cursor is nowhere to be seen, I can't type anything in the textbox until
I tab back to the textbox.  Tab order for textbox is 0.  Am I missing
something?

Appreciate any help.

--
Mitchell Renner



Wed, 18 May 2005 16:22:24 GMT  
 Can't get cursor to appear in textbox
Hi Mitch,

In the Macro that calls the userform, just use

UserForm1.Show.

In the Initialize() event for the userform use

Private Sub UserForm_Initialize()
TextBox1.SetFocus
End Sub

That code is in the userform itself, not in the macro that calls the
userform.

Please post any response to the newsgroups for the benefit of others who may
also be following the thread.

Hope this helps,
Doug Robbins - Word MVP

Quote:
> I'm really at a loss here...

> Load UserForm1
> UserForm1.TextBox1.SetFocus
> UserForm1.Show

> The cursor is nowhere to be seen, I can't type anything in the textbox
until
> I tab back to the textbox.  Tab order for textbox is 0.  Am I missing
> something?

> Appreciate any help.

> --
> Mitchell Renner




Wed, 18 May 2005 18:17:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. 'Canned' data in VB program

2. Getting blanks in filenames to appear in dynamically built href's

3. How to trap the cursor's location in a textbox

4. Custom cursor appears as black and white at run time

5. My projects containg toolbars don't appear Can't find COMCTL32.ocx

6. How to make first letter of textbox appear only

7. Selecting textboxes in order the appear in doc

8. Bindingd Dataset to Textbox appears flawed.

9. Masking a password textbox to appear as all *****

10. An Unwanted Comma appears in TextBox

11. Problem getting common dialog to appear in NT 4.0

12. Getting the text property to appear in a custom button

 

 
Powered by phpBB® Forum Software