Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default getting the cursor to show in a textbox

Thanks Tom worked a treat!!!!

Simo

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW DO I GET THE CURSOR TO SHOW UP austin63 Setting up and Configuration of Excel 1 January 13th 09 06:56 PM
Textbox to show date K1KKKA Excel Discussion (Misc queries) 2 October 22nd 07 11:32 PM
select from combobox and show a price in textbox gem New Users to Excel 1 June 14th 06 11:37 AM
multiply two numbers and show the answer in a textbox gem Excel Discussion (Misc queries) 5 June 14th 06 12:07 AM
SetFocus to first textbox on userform upon Userform1.Show Paul Simon[_3_] Excel Programming 6 February 11th 04 04:31 PM


All times are GMT +1. The time now is 08:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"