Testing for chart in a worksheet

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

Guest

Hello,
I have a program that will allow me to input data on many sheets, in my
workbook, from various testing that I do in a our lab. The program has a
cmdbutton which executes a macro to generate an MSWord document. The macro
cycles through each sheet in the activeworkbook and pulls data from cells and
writes it to the Word application. As the macro cycles through each sheet I
want it to check if there's a chart on that sheet and if so select and copy
it to the Word document. Is that possible somewhere in VBA??

Thanks,
Matt
 
Hi Matt,

Have a look at the ChartObject

Msgbox "Activesheet contains " & _
Activesheet.ChartObjects.count & " charts"

Cheers
Andy
 
Thanks Andy. I appreciate it.
Matt

Andy Pope said:
Hi Matt,

Have a look at the ChartObject

Msgbox "Activesheet contains " & _
Activesheet.ChartObjects.count & " charts"

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top