Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Testing for chart in a worksheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Testing for chart in a worksheet

Hi Matt,

Have a look at the ChartObject

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

Cheers
Andy

MBaars wrote:

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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Testing for chart in a worksheet

Thanks Andy. I appreciate it.
Matt

"Andy Pope" wrote:

Hi Matt,

Have a look at the ChartObject

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

Cheers
Andy

MBaars wrote:

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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Chart Properties for Multiple Chart Shts using a Worksheet KUMPFfrog Charts and Charting in Excel 0 July 22nd 09 11:01 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Charts and Charting in Excel 3 August 24th 06 07:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Excel Worksheet Functions 2 August 24th 06 05:26 PM
Testing for existence of a worksheet in the active workbook Ken Loomis Excel Programming 2 October 6th 04 03:32 AM
Testing for a open worksheet from Outlook Phillips[_3_] Excel Programming 1 December 30th 03 07:45 AM


All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"