HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

Slider control in VBA

2009-03-04View Original

Thread Content

Place a slider control in the form. By default, the value increases when the slider is moved downward; if you want the value to decrease when it is moved downward, please advise me on how to write the code That is, to change the direction of obtaining or setting the added value. IsDirectionReversed=true cannot be implemented – is it because the slider does not have this attribute?
Reply #22009-03-04
The general use of a slider is to visually display the range and the current position (via the value attribute); it depends on how you use it – but can’t it be used in reverse?
Reply #32009-03-04
Use it in reverse – how exactly is that achieved? Need the code? Should I set its position and other properties instead?
Reply #42009-03-04
I’m not sure about your application, but it definitely reads the Value property of the slider (if you want to give it a try, you can handle it in the slider’s Change event). Suppose the slider’s min value is 0, its max value is 100, and its value is 30; in this case the slider is located in the upper middle part. But the value you want to display is 70, is that correct? If so, then the displayed value = 100 - value. I wonder if this meets your requirements?
Reply #52009-03-05
Well, that’s what it means. I still don’t know; the current value of Slider is slider.value. So, if we define his current display value as Val_value, then how should val_slider = Slider.Max - Slider.Value be written? It can’t possibly be val_value = slider.value, right? Please give me some advice. Thank you.
Reply #62009-03-05
I’m not sure about your specific application. I can’t be any more detailed. dim curValue as Integer curValue = Slider1.Max - Slider1.Value MsgBox curValue

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.