View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
William[_2_] William[_2_] is offline
external usenet poster
 
Posts: 227
Default error handling - check chart existance

Hi annette

Sub test()
Dim ch As Chart
For Each ch In ThisWorkbook.Charts
If ch.Name = "Chart1" Then
MsgBox "Chart exists"
Exit For
End If
Next ch
End Sub

--
XL2002
Regards

William



"annette2002 " wrote in message
...
| I've a chart sheet namely "chart1" and I want to check if this chart
| exists in the file before calling other functions. without checking
| this in the working file and that the chart does not exist.
| is there a question to catch this?
|
|
| ---
| Message posted from
http://www.ExcelForum.com/
|