I am using a spin button control on a form that changes a value in a text box. After it is spun up or down, the control retains focus and puts a box around both the up and down arrows.
It is the same issue mentioned here:
http://www.xtremevbtalk.com/showthread.php?t=291951
The solution listed at this link is to set focus to the text box, as in:
However, I can't get that to work consistently for me. When I use the spin button once, it works once, i.e., you click the spin button up or down and the boxes don't show up. But, on the second press, the boxes show up, and then they continue to appear and disappear each time you click the control.
Any ideas why? It's a minor issue, but it seems like it's close to working.
It is the same issue mentioned here:
http://www.xtremevbtalk.com/showthread.php?t=291951
The solution listed at this link is to set focus to the text box, as in:
Code:
Sub spnValue_SpinDown()
[INDENT]TextBox1.Value = TextBox1.Value - 1
TextBox1.SetFocus
[/INDENT]End Sub
Sub spnValue_SpinUp()
[INDENT]TextBox1.Value = TextBox1.Value + 1
TextBox1.SetFocus
[/INDENT]End Sub
However, I can't get that to work consistently for me. When I use the spin button once, it works once, i.e., you click the spin button up or down and the boxes don't show up. But, on the second press, the boxes show up, and then they continue to appear and disappear each time you click the control.
Any ideas why? It's a minor issue, but it seems like it's close to working.