Last post Jul 09, 2013 10:31 PM by Paul Linton
Jul 09, 2013 03:13 PM|Mitch Smith|LINK
Hi guys...I am needing to delete a chart on Excel spreadsheet. However, I only want to delete the one titled Chart 232. How can I specify which chart to delete and not use
foreach (Shape shp in Excel.Application.Sheets["Sheet 1"].Shapes)
if (shp.Type == MsoShapeType.msoChart)
Jul 09, 2013 10:31 PM|Paul Linton|LINK
I'm not sure why you would ask an ASP.Net forum about Excel (I would have thought an Excel programming forum was likely to give more accurate answers).
But, I can answer all your Excel questions in one go.
1) Click on the Developer tab
2) Click on Record Macro
3) Click OK in the dialog box
4) Do whatever it is you want to know how to write a program for
5) Click the 'Stop Recording' button in the status bar
6) Press Alt-F11
7) Use the navigation pane on the left to open Module 1
8) Read Macro1