View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
dok112[_120_] dok112[_120_] is offline
external usenet poster
 
Posts: 1
Default Keeping focus on a txtbox


heres the reply from your other thread. it's the same thing to be
done.

I dont have much experience with spinbuttons, but just as a little fun,
I tried to goof around with it. It's probably not 100% correct as far as
correct programming format, but it gets the job done, at least on my
system.

Add a SpinButton1.SetFocus command before the TextBox1.SetFocus
command. When you click on it, it doesnt depress like normal, but it
does reset the focus after only 1 click each time.

Option Explicit
Private Sub SpinButton1_SpinDown()
SpinButton1.SetFocus
TextBox1.SetFocus
End Sub
Private Sub SpinButton1_SpinUp()
SpinButton1.SetFocus
TextBox1.SetFocus
End Sub


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=531110