PDA

View Full Version : Solved: Scrollbar



SDave
06-14-2010, 05:31 AM
Afternoon all,

I've inserted a scrollbar from the forms control dialogue, however I'm having trouble getting it to actually work?!

I would like it to scroll columns left and right, however the scrollbar should stay fixed in it's current position.

The scrollbar currently sits across cells L18:R18

I thought it would be as simple as:


ActiveWindow.ScrollColumn = Selection.Column +1

apparently not!!!

Any help would be much appreciated.

Thanks

Simon Lloyd
06-14-2010, 05:57 AM
If you have the scroll bar on the worksheet what is it meant to scroll?, when used on its own like this it scrolls nothing, it simply increases or decreses a number set in the Format control options.

mdmackillop
06-14-2010, 09:19 AM
Maybe something like this, where R18 is the linked cell

Sub test()
ActiveWindow.ScrollColumn = Range("R18")
ActiveSheet.Shapes("Scroll Bar 1").Left = Cells(1, Range("R18")).Left
End Sub