In trying to remove black border from spin button onclick
(btw, I’m very interesting about the reasons for this ugly black border)
Private Sub spin01_SpinUp()
... //some code
ch01.SetFocus // ch01 is a textbox
First click – there are no borders
Next click – borders are there
Next click – there are no borders – and so on
The same is for SpinDown()
Very strange, isn’t it?
Those black borders are to let you know the spin button currently has focus. If you click on the textbox
ch01on your userform, then the lines will go away. AFAIK there isn’t any property to remove those Black Borders permanently.What is happening in your case is the code transfers the focus to the textbox
ch01and that is when you do not see the borders but when the focus comes back to the Spin Button, those black borders are back.Alternative:
Use Two command buttons and replicate the functionality of the Spin Button. You can also change the
.Pictureto show arrows instead of text on the command button. See Screenshot BelowFOLLOWUP