View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_495_] Simon Lloyd[_495_] is offline
external usenet poster
 
Posts: 1
Default 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