Control starting value for spinner

  • Thread starter Thread starter vbawannab
  • Start date Start date
V

vbawannab

Fairly new to VBA. I have a worksheet where users will enter a coupl
of values and a number of calculations are linked to those values.
have also added a spinner that will allow the user to adjust some o
the variables and create new calculations. Thsi all works fine.

My trouble is controlling the values in the spinner. Right now I hav
coded a Min/Max and Value for each spinner. Ideally I would like t
have the spinner start with whatever value the user enters. Any idea
how to do that?

Thanks
 
Assuming the user puts the value in a textbox, then

spnCalc.Value = Clng(Textbox1.Text)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks, Bob. The user is entering values directly into cells. Ideall
I'd like to pull the value from the cell
 
In that case

spnCalc.Value = CLng(Range("A1").Value)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks again for the help, Bob. I obviously need to do a little mor
studying. The spinner value now goes straight to zero (my minimum) whe
I click on it. Here is what I have now. I think I need to control th
entrie process within the vba code -- not just the starting value.

Sub SpinButton4_Change()
SpinButton4.Value = CLng(Range("E19").Value)
End Su
 
Probably best to post the full code and some details of what you do and
enter in the cells etc.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top