ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   graph image -how to superimpose or extra data-point by VBA (https://www.excelbanter.com/excel-programming/434631-graph-image-how-superimpose-extra-data-point-vba.html)

davyboom

graph image -how to superimpose or extra data-point by VBA
 
I got 2 yield curve image files and need tooverlay the yield curves for
coparison.
How to program in VBA to
1. superimpose the 2 grah pciture, or
2. get data point direct such that can re-plot in one graph.


Patrick Molloy[_2_]

graph image -how to superimpose or extra data-point by VBA
 
assuming you have an image oject and a chart object then:


Sub Main()
Dim ch As ChartObject
Set ch = Sheet1.ChartObjects(1)
With Sheet1.Image1
ch.Top = .Top
ch.Left = .Left
ch.Height = .Height
ch.Width = .Width
..BackStyle = fmBackStyleTransparent
..BringToFront
End With



End Sub

"Davyboom" wrote:

I got 2 yield curve image files and need tooverlay the yield curves for
coparison.
How to program in VBA to
1. superimpose the 2 grah pciture, or
2. get data point direct such that can re-plot in one graph.


davyboom

graph image -how to superimpose or extra data-point by VBA
 


"Patrick Molloy" wrote:

assuming you have an image oject and a chart object then:


Sub Main()
Dim ch As ChartObject
Set ch = Sheet1.ChartObjects(1)
With Sheet1.Image1
ch.Top = .Top
ch.Left = .Left
ch.Height = .Height
ch.Width = .Width
.BackStyle = fmBackStyleTransparent
.BringToFront
End With



End Sub

"Davyboom" wrote:

I got 2 yield curve image files and need tooverlay the yield curves for
coparison.
How to program in VBA to
1. superimpose the 2 grah pciture, or
2. get data point direct such that can re-plot in one graph.


davyboom

graph image -how to superimpose or extra data-point by VBA
 
Thanks to Patrick.

Can your prgoram work if my image file is of JGP type. The yeild curve from
web is of Java and could only be snapped by prt-screen.

thanks,


"Patrick Molloy" wrote:

assuming you have an image oject and a chart object then:


Sub Main()
Dim ch As ChartObject
Set ch = Sheet1.ChartObjects(1)
With Sheet1.Image1
ch.Top = .Top
ch.Left = .Left
ch.Height = .Height
ch.Width = .Width
.BackStyle = fmBackStyleTransparent
.BringToFront
End With



End Sub

"Davyboom" wrote:

I got 2 yield curve image files and need tooverlay the yield curves for
coparison.
How to program in VBA to
1. superimpose the 2 grah pciture, or
2. get data point direct such that can re-plot in one graph.



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com