Help with a Chart Fill from Access to Excel

  • Thread starter Thread starter EAB1977
  • Start date Start date
E

EAB1977

I am trying to put a nice touch to the background of a chart that I
have, but I keep getting a Error 1004 Application object error on this
part of the code:

.Selection.Fill.OneColorGradient Style:=msoGradientHorizontal,
_
Variant:=1, Degree:=0.36

I am doing Excel automation from Access and I get this error every
time. If I do this in Excel, I do not get this error.

Has anyone tried this and had any success?
 
I have found my answer on my own.

When using the above code in Automation with Excel, for some reason,
the msoGradientHorizontal was not registered correctly. In my
instance, it automaticlly registered for me and now works.
 
Back
Top