LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Freezes chart position with scrolling

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to change position of chart labels on line chart Shane Henderson[_2_] Charts and Charting in Excel 1 May 27th 11 09:31 AM
Scrolling Along Chart F. Lawrence Kulchar Excel Discussion (Misc queries) 1 January 5th 08 01:31 PM
Scrolling through chart Pierre Charts and Charting in Excel 1 August 1st 05 08:42 AM
Scrolling chart slamm Excel Discussion (Misc queries) 1 June 27th 05 01:56 AM
Changing chart title changes position of chart Bing Excel Programming 3 March 9th 05 08:11 AM


All times are GMT +1. The time now is 05:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"