Passing Chart through

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know if it is possible to pass a Chart through to a function.
Hopefully I am saying that correct.

I have a form that passes 5 text fields through to a module that exports
those fields into excel. I have a chart on this form that I would like to
pass through as well. This is what I am trying but it gives me a type
mismatch error.

Button on Form:

ExportToExcel text1, text2, text3, text4, text5, chart

Module

Function ExportToExcel (text1 As String, text2 As String...chart As Chart)
.....
End Function

The problem is the chart As Chart. I have also tried chart as ChartObject.
Same result.
 
I am having Access create my chart. On my form I have an Account Detail
button that takes the fields from my form and exports them into excel into a
presentation format. I want it to send the Access Generated Chart to excel as
well.

Any ideas?
 
Back
Top