Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default Floating Chart?

Hi All.......

I have created a chart by macro. It sets on the same sheet as my data from
which it is drawn. As I scroll the data, the charts move with the
scrolling. I would like it to "float" in the same spot on the screen and
have the data scroll by behind it. Is this a doable thing?

TIA
Vaya con Dios,
Chuck, CABGx3

Sub CholesterolChart()
ActiveSheet.ChartObjects.Delete
Range("Maximum").Value = Range("bx30").Value
Range("Minimum").Value = Range("bw30").Value
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData
Source:=Sheets("BloodTests").Range("B23:bv23"), PlotBy _
:=xlRows
ActiveChart.SeriesCollection(1).XValues = "=BloodTests!R26C2:R26C49"
ActiveChart.SeriesCollection(1).Values = _
"=BloodTests!Cholesterol"
ActiveChart.SeriesCollection(1).Name = "Cholesterol"
ActiveChart.Location Whe=xlLocationAsObject, Name:="BloodTests"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Cholesterol"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
ActiveChart.HasLegend = False
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = _
"=BloodTests!Maximum"
ActiveChart.SeriesCollection(2).Name = "=BloodTests!R22C1"
ActiveChart.SeriesCollection(3).Values = _
"=BloodTests!Minimum"
ActiveChart.SeriesCollection(3).Name = "=BloodTests!R23C1"
'ActiveWindow.Visible = False
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Floating Chart?


as a starter you could try this code in the sheet's code module, as long
as there is only one window open for this workbook, it should work,
though it will need you to select a cell rather than just scroll with
the scroll bars:

Code:
--------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ChartObjects(1).Left = Cells(1, ThisWorkbook.Windows(1).ScrollColumn).Left + 20
End Sub

--------------------


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: 558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=164092

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default Floating Chart?

Pretty cool p45cal, that's the best thing I got going...........many thanks!

Vaya con Dios,
Chuck




"p45cal" wrote in message
...

as a starter you could try this code in the sheet's code module, as long
as there is only one window open for this workbook, it should work,
though it will need you to select a cell rather than just scroll with
the scroll bars:

Code:
--------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ChartObjects(1).Left = Cells(1,
ThisWorkbook.Windows(1).ScrollColumn).Left + 20
End Sub

--------------------


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: 558
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=164092

Microsoft Office Help



Reply
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
floating chart [email protected] Charts and Charting in Excel 3 March 17th 08 01:09 AM
Floating bar chart - How? Tec92407 Charts and Charting in Excel 3 October 31st 06 07:03 PM
Floating Bar Chart Andy the Yeti Charts and Charting in Excel 2 October 9th 06 10:32 AM
Floating chart dtscfo Charts and Charting in Excel 2 August 6th 06 03:07 AM
floating bar chart? Karol Charts and Charting in Excel 3 July 11th 05 06:17 PM


All times are GMT +1. The time now is 07:44 PM.

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

About Us

"It's about Microsoft Excel"