Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Chart Location in VFP 6.0

Status
Not open for further replies.

jcbirch

MIS
Dec 16, 2004
18
US
Hi,

I'm creating an Excel report with a cover page (1st sheet) and a chart on the 2nd sheet, chart values in fields D35-F39. I can create the chart just fine. However, when I try to specify the location as an object on Sheet3, it totally disregards my specifications, and instead places the chart on the first tab every time.

Below is basically the part of my code that I need help with. Even though this says that I want the chart on "Sheet3," the chart ends up on "Sheet1."

I'm using VFP 6.0 SP 5.

.Sheets(3).Select
oSheet = .ActiveSheet
WITH .ActiveWorkbook
.Charts.Add
With .ActiveChart
.SetSourceData(oSheet.Range("D35:F39"),2)
.Location(2, "Sheet3")
EndWith
ENDWITH

Thanks,
Jessica
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top