View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt Dalkie Matt Dalkie is offline
external usenet poster
 
Posts: 2
Default SpinButton control and focus

Hi all,

I have a UserForm with a number of SpinButton controls which increase
or decrease the value in associated text boxes. Everything works
fine, but to tidy up the display a little, I want to make sure the
focus is changed to the text box, and not rest with the SipnButton.
Using the .SetFocus method appears to only work every other time the
SpinButton is changed. Is there something I'm missing here?

Code is as follows:

Sub SpinBn1_Change
With TextBx1
.Value = SpinBn1.Value
.SetFocus
End With
End Sub

Many thanks in advance

M@