tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,194
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I want to keep a chart viewable on a sheet at all times, having seeen a lot of google coments saying it cant be done I thought what about using the VBA scroll bar as aposed to the excel one?
So a got as far as this
but it doesnt work because Target.Cells. is not a thing,
so
If anyone can help me heres what i want
as I move the VBA scrollbar up or down the chart named Test1 top left corner is in line with the scroll bar (Thingy that you use to scroll up and down with.
please help if you can
Thanks
Tony
I want to keep a chart viewable on a sheet at all times, having seeen a lot of google coments saying it cant be done I thought what about using the VBA scroll bar as aposed to the excel one?
So a got as far as this
VBA Code:
Private Sub ScrollBar1_Change()
If Target.Cells.Count > 1 Then Exit Sub
With ActiveWindow.VisibleRange
ActiveSheet.ChartObjects(1).Top = .Top + 5
ActiveSheet.ChartObjects(1).Left = .Left + .Width - _
ActiveSheet.ChartObjects(1).Width - 45
End With
End Sub
but it doesnt work because Target.Cells. is not a thing,
so
If anyone can help me heres what i want
as I move the VBA scrollbar up or down the chart named Test1 top left corner is in line with the scroll bar (Thingy that you use to scroll up and down with.
please help if you can
Thanks
Tony