I want to scroll the screen using the toolbox scrollbar, any ideas?

Badassack

New Member
Joined
Feb 26, 2014
Messages
36
I'm using a form so theres no way to scroll down the screen while in the form. So i thought why can't you use the toolbox scroll bar on the form to scroll up and down the worksheet. I would love some ideas, i can't find anything on the net about this. thank you.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Simple example:
Code:
Private Sub ScrollBar1_Change()
   ActiveWindow.ScrollRow = ScrollBar1.Value
End Sub

Private Sub UserForm_Initialize()
   With Me.ScrollBar1
      .Min = 1
      .Max = ActiveSheet.Rows.Count
   End With
End Sub

It would probably be easier just to make the form modeless. :)
 
Upvote 0
Simple example:
Code:
Private Sub ScrollBar1_Change()
   ActiveWindow.ScrollRow = ScrollBar1.Value
End Sub

Private Sub UserForm_Initialize()
   With Me.ScrollBar1
      .Min = 1
      .Max = ActiveSheet.Rows.Count
   End With
End Sub

It would probably be easier just to make the form modeless. :)

It would't work the way you wrote it. gave me an ambiguous name error. Was i supposed to use one or the other? I combined the two codes and it work's, thanks.

Private Sub scbauto_Change()
ActiveWindow.ScrollRow = scbauto.Value
With Me.scbauto
.Min = 1
.Max = ActiveSheet.Rows.Count
End With


End Sub
 
Upvote 0
I guess you already had a Userform_Initialize event then. :)
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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