PDA

View Full Version : [SOLVED:] SPINBUTTON RIGHT TO LEFT



GAVIOTA ONE
05-31-2015, 03:11 PM
good evening everybody ..forum.members.and moderators.
I'm so happy to join you in this great and best forum.


in my first discussion

I head you are hoping to solve my little problem
because of a small job I want the spinbutton walking from right to left
I have two file. in the first file spinbutton walking from right to left.
I want to adapt this spinbutton code in the workbook number 2 for the spinbutton also works as file number 1 from right to left
thank you in advance
cordially
GAVIOTA
13565

SamT
05-31-2015, 03:30 PM
I don't understand the problem/issue..

Both codes should work in either workbook. As Long as all the ranges and UserForm controls are named to suit the code.

GAVIOTA ONE
05-31-2015, 03:43 PM
I don't understand the problem/issue..

Both codes should work in either workbook. As Long as all the ranges and UserForm controls are named to suit the code.

hiiiii SamT
thank you for help
I want to reverse the direction of spinbutton in this workbook 2
see please
please see the picture
thank you
cordially
gaviota

p45cal
05-31-2015, 03:54 PM
like this?
(just used the same techniques as in your first file; added a dynamic range name (Noms) and tweaked code from that file)

GAVIOTA ONE
05-31-2015, 04:10 PM
like this?
(just used the same techniques as in your first file; added a dynamic range name (Noms) and tweaked code from that file)

Hiiii p45cal
thank you very much
thank you very much for this great pleasure
it's perfect for your part
it's so much I want
it is resolved
thank you
cordially
GAVIOTA
(((is what I can find a code spinbutton right to left that I can use and I can adapt to all userforms ??)))

SamT
05-31-2015, 04:21 PM
Use SpinbuttonReverseValue to go in opposite direction

SpinButtonReverseValue = Spinbutton.Max - SpinButton.Value

Put this code in a Module, then call it in any UserForm

Function SpinButtonReverseValue(FormSpinButton As UserForms.SpinButton) As Integer
SpinButtonReverseValue = FormSpinButton.Max - FormSpinButton.Value
End Function
Example from SpinButton2.xlsm

If SpinButtonReverseValue(Me.SpinButton1) = cl Then

GAVIOTA ONE
05-31-2015, 04:28 PM
Use SpinbuttonReverseValue to go in opposite direction

SpinButtonReverseValue = Spinbutton.Max - SpinButton.Value
hiiii SamT
I tried and it does not work with me.
thank you for help and adapt in this workbook
13568

SamT
05-31-2015, 04:35 PM
I edited my post. try again
Change the Max Property on the Spinbutton.

GAVIOTA ONE
05-31-2015, 04:44 PM
I edited my post. try again
Change the Max Property on the Spinbutton.

please master
I am newbie in vba excel
if you make me happy and put me your code in this workbook to better understand you
thank you in advance for your patience
13569

SamT
05-31-2015, 04:50 PM
New Code in UserForm and in Module 1

GAVIOTA ONE
05-31-2015, 05:03 PM
New Code in UserForm and in Module 1
thank you master SamT
thank you a lot
now it is solved
thank you again
it's beautiful work and beautiful code of your hand
cordially
GAVIOTA