Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A tip for everybody that faces troubles, like me, trying to freeze the
chart position in the Worksheet against horizontal scrolling. The only way to do this using event inside the Worksheet code. It's just click the right button at the mouse, in the sheet name and choose the "show code" option. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static LeftScroll As Integer ### The variable value in static type is preserved between differents ### runnings. If ActiveWindow.ScrollColumn < LeftScroll Then ### This test is good to avoid flickering every time that the selection ### changes ActiveSheet.ChartObjects(1).Left = 93 + Cells(1, ActiveWindow.ScrollColumn).Left ### I'm supposing that 93 is the ActiveSheet.ChartObjects(1).Left ### when active window left-top position is at Column A End If LeftScroll = ActiveWindow.ScrollColumn ### Save the new scroll column in the active window End Sub It's very similar to do the same with vertical scrolling trouble. That is one of the flaws from Excel developers because they create a property with fewer values that would be necessary ChartObjects(1).Placement (ActiveChart.parent is a ChartObject object) It could be, I can say, a XlFreeze option, with the feature above described (in addiction to XlMoveSize, XlMove and XlFreeFloating values) I'II hope that this tip will be useful for someone Paulo Buchsbaum (From Brazil) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to change position of chart labels on line chart | Charts and Charting in Excel | |||
Scrolling Along Chart | Excel Discussion (Misc queries) | |||
Scrolling through chart | Charts and Charting in Excel | |||
Scrolling chart | Excel Discussion (Misc queries) | |||
Changing chart title changes position of chart | Excel Programming |