How to Sort this SpinButton Prob in UserForm????

nyk911

New Member
Joined
Jun 19, 2014
Messages
4
I have userform to enter data and the worksheet. There are 21 textboxes and command buttons which are perfectly fine.
The problem im facing is with 2 spinbuttons which scrols through the entered data and also populates the respective textboxes in the userform. Those 2 spinbuttons are with different small-change value as i deal with about 5000 (rows).

SpinButton1 with small-change value of 1
SpinButton2 with small-change value of 1000

What i want is that when scroll SpinButton2 and jump from row1 to row1000, and use SpinButton1.....
i want it to start from where spinbutton2 rested.

(If I use SpinButton1 after After SpinButton2,,,,The SpinButton1 Active Cell to start with Cell where SpinButton2 rested)

:warning:
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Have you considered using a ScrollBar instead? The ScrollBar has both a SmallChange property and a LargeChange property. So you could set the SmallChange property to 1 and the LargeChange property to 1000.
 
Upvote 0
Hello Dominic,

Thanks for your prompt reply. I would like to mention that my process is to populate the info from the worksheet to the textboxes in the userform. There will be around 5000 rows that i will scroll through and edit then save. These will be done using the spinbuttons and commandButton.
First spinbutton will spin each row by row. (small-change value of 1)
Second spinbutton will spin by jumping to next thousand rows. (small-change value of 1)

My prob is that.... if i want to edit row-2008, then i click spinbutton2 twice to get to the row-2000 and click spinbutton1 but it does not start from row-2000... it starts from where ever it was resting earlier.

Thank you so much for the support!!!!!!
 
Upvote 0
A scroll bar could do that.
If you insist on spin buttons, code like this will link them.
Code:
Private Sub SpinButton1_Change()
    SpinButton2.Value = SpinButton1.Value
End Sub

Private Sub SpinButton2_Change()
    SpinButton1.Value = SpinButton2.Value
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top