View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Runtime Error '1004' Method 'ActiveChart' of Object '_Global' failed

I tried what you suggested but Access didn't
recognize .drawingObject.Formula,


Not sure why that doesn't work but I don't think related to Access

myShape.DrawingObject.Formula =
is effectively the same as
myTexbox.Formula =
albeit getting to it from a different approach

The code
thats giving me the issue doesn't execute 'til right. If you have any
more suggestions they will be greatly appreciated.


Difficult to suggest without some idea of what in particular "doesn't
execute 'til right". Try and get it all working in an Excel project first,
and without selecting anything (selecting / de-selecting chartobject charts
is not always straightforward).

Regards,
Peter T


wrote in message
oups.com...
Thanks Peter,

I tried what you suggested but Access didn't
recognize .drawingObject.Formula, I know you wrote untested so I'm
guessing thats why. Your second solution however did work. So I no
longer get that issue with inputting the formula however when doing
that you showed I actually had two problems instead of 1 because I
still get that error message every other time but the formula fills in
everytime.

I already had the excel reference to xlCategory I use it many times in
the code before that happens, so I don't think thats it. The code
thats giving me the issue doesn't execute 'til right. If you have any
more suggestions they will be greatly appreciated.

However if not thanks a lot for the formula suggestion I'd rather that
work everytime anyway even if the user still has to close the excel
sheet in the event of an error.