Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
getting the cursor to show in a textbox
Hi all,
I have created a userform to act as a password input box and if th password is a match then do a couple of things...which it does quit happily.....but next time the tool bar button is clicked to which assigned the macro the userform pops up the Textbox has no curso flashing in it so you have to have another mouse click to select th box before typing the password. Anyone know how to get the cursor blinking in the textbox each time it opened? Here's some snippets of code:- Sub Admin() ' ' Admin Macro ' Macro recorded 21/06/2004 by Simon ' ' UserForm2.Show End Sub Private Sub CommandButton1_Click() UserForm2.Hide TextBox1.Text = "" End Sub Private Sub TextBox1_Change() If TextBox1.Text = "pass" Then Application.CommandBars.ActiveMenuBar.Enabled = True Worksheets("Hidden").Visible = True ElseIf TextBox1.Text < "pass" Then Exit Sub End If Me.Hide End Su -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
getting the cursor to show in a textbox
Private Sub CommandButton1_Click()
UserForm2.Hide TextBox1.Text = "" Textbox1.Setfocus End Sub might work. -- Regards, Tom Ogilvy "Simon Lloyd " wrote in message ... Hi all, I have created a userform to act as a password input box and if the password is a match then do a couple of things...which it does quite happily.....but next time the tool bar button is clicked to which i assigned the macro the userform pops up the Textbox has no cursor flashing in it so you have to have another mouse click to select the box before typing the password. Anyone know how to get the cursor blinking in the textbox each time its opened? Here's some snippets of code:- Sub Admin() ' ' Admin Macro ' Macro recorded 21/06/2004 by Simon ' ' UserForm2.Show End Sub Private Sub CommandButton1_Click() UserForm2.Hide TextBox1.Text = "" End Sub Private Sub TextBox1_Change() If TextBox1.Text = "pass" Then Application.CommandBars.ActiveMenuBar.Enabled = True Worksheets("Hidden").Visible = True ElseIf TextBox1.Text < "pass" Then Exit Sub End If Me.Hide End Sub --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
getting the cursor to show in a textbox
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOW DO I GET THE CURSOR TO SHOW UP | Setting up and Configuration of Excel | |||
Textbox to show date | Excel Discussion (Misc queries) | |||
select from combobox and show a price in textbox | New Users to Excel | |||
multiply two numbers and show the answer in a textbox | Excel Discussion (Misc queries) | |||
SetFocus to first textbox on userform upon Userform1.Show | Excel Programming |