Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP With Charts using VBA in excel

Status
Not open for further replies.

Nick34

Technical User
Oct 16, 2003
50
US
I have created a chart sheet using VBA in excel, but I can not figure out how to input the data I want to graph using VBA. Can anybody help me?
 
I did that, and now I am getting it to work.

I was also wondering if you know how I could tell excel to check to see if my chart is there, and if it is delete it?

I would then like to re-create the chart based on different data.
 
A Chart can be embedded, in which case it is a ChartObject or a sheet in which case it is a Chart.

To delete all charts in a workbook...
Code:
dim cht as cahrt, ws as worksheet, co as chartobject
for each cht in activeworkbook.charts
  cht.delete
next
for each ws in worksheets
  for each co in ws.chartobjects
    co.delete
  next
next
:)


Skip,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top