J
jdub765
I'm working in TestPartner, an automation tool that uses VB6, and I either
need to reposition a chart, or change the default position. I've been
searching to find a solution, but I can't seem to get it to work...
I found this link
http://msdn.microsoft.com/newsgroup...icedev-excel&lang=en&cr=US&sloc=en-us&m=1&p=1
and I think I need to use this code:
With ActiveSheet.Shapes("Chart 1")
.Left = ActiveCell.Left
.Top = ActiveCell.Top
End With
I don't know how to use the code above in my code below...
Private Sub GenerateGraph(objChart As Excel.Chart)
objChart.ChartType = xlPie
objChart.SetSourceData source:=objSheet.Range("B4:C5"), PlotBy _
:=xlColumns
objChart.location Where:=xlLocationAsObject, name:="Graph"
End Sub
Any help is greatly appreciated!
need to reposition a chart, or change the default position. I've been
searching to find a solution, but I can't seem to get it to work...
I found this link
http://msdn.microsoft.com/newsgroup...icedev-excel&lang=en&cr=US&sloc=en-us&m=1&p=1
and I think I need to use this code:
With ActiveSheet.Shapes("Chart 1")
.Left = ActiveCell.Left
.Top = ActiveCell.Top
End With
I don't know how to use the code above in my code below...
Private Sub GenerateGraph(objChart As Excel.Chart)
objChart.ChartType = xlPie
objChart.SetSourceData source:=objSheet.Range("B4:C5"), PlotBy _
:=xlColumns
objChart.location Where:=xlLocationAsObject, name:="Graph"
End Sub
Any help is greatly appreciated!