Hi!
I am creating a form with multiple charts from a chemical dataset. I have created all queries together with a "blueprint" chart, designed to fit my needs. Now I want to copy this chart, paste it into the form at a specific position and then change the rowsource to show the next parameter in the table. My questions:
Please advice!
Regards, Martin
I am creating a form with multiple charts from a chemical dataset. I have created all queries together with a "blueprint" chart, designed to fit my needs. Now I want to copy this chart, paste it into the form at a specific position and then change the rowsource to show the next parameter in the table. My questions:
- When I use the following code
Code:
Public Sub test() Dim mychart As Object Set mychart = Forms!FormName.BlueprintChart.Object.Application.Chart With mychart .Activate .Copy .Paste .Left 50 .HasTitle = True .ChartTitle.Text = "" End With Set mychart = Nothing End Sub
- After copying the charts, I want to set the Chart Title to the name of the parameter. This data is stored in the rowsource, and also happens to be the name of the rowsource query. How to I capture it with vba? I have tried using
Code:
Chart.Application.DataSheet.Cells(1, x)
Please advice!
Regards, Martin