ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform SpinButton problem (https://www.excelbanter.com/excel-programming/366252-userform-spinbutton-problem.html)

Ozgur Pars[_2_]

Userform SpinButton problem
 
Hello,
I am currently using spinbuttons on a userform and I am passing the current
values from an excel sheet onto them.

Something like:
Private Sub UserForm_Activate()
SpinButton1.Value = Sheets(1).Range("B1")
end sub

The problem is that if the current value is the minumum value of the
spinbutton the label.caption does not display this number. In all the other
cases the correct number is displayed(including the max number of the
spinbutton)
Why is this happening and how can I display the minumum numbers also?

Thanks,
Özgür

crazybass2

Userform SpinButton problem
 
Ozgur,

Your code worked for me. What min/max value are you using and is there any
other code that effects the spinbutton, or the label?

Mike

"Ozgur Pars" wrote:

Hello,
I am currently using spinbuttons on a userform and I am passing the current
values from an excel sheet onto them.

Something like:
Private Sub UserForm_Activate()
SpinButton1.Value = Sheets(1).Range("B1")
end sub

The problem is that if the current value is the minumum value of the
spinbutton the label.caption does not display this number. In all the other
cases the correct number is displayed(including the max number of the
spinbutton)
Why is this happening and how can I display the minumum numbers also?

Thanks,
Özgür


Ozgur Pars[_2_]

Userform SpinButton problem
 
Mike,
thanks for your reply.

While I was repying I figured it out ...I only put code in the change of the
spinbuttons and did not load the numbers in the activate userform event. I
added it and it worked of course. But I am still puzzeled while only when at
minimum was not displayed... anyway thanks for your help.

Ozgur


All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com