Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default deselect chart


Need to select all shapes and delete them.
However there is a chart - "Chart1" - that needs to be deselected, as it
needs to remain on the sheet.

Have made numerous attempts, this one seems to make sense but doesn't work....
ActiveSheet.Shapes.SelectAll
ActiveSheet.Shapes("Chart1").Deselect

How do I select all shapes, then deselect Chart1?

Thanx,
- Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default deselect chart

I have not tried this, but it might work.

Sub dk()
For Each s In ActiveSheet.Shapes
If s.Name < "Chart1" Then
s.Delete
End If
Next
End Sub


"MikeF" wrote in message
...

Need to select all shapes and delete them.
However there is a chart - "Chart1" - that needs to be deselected, as it
needs to remain on the sheet.

Have made numerous attempts, this one seems to make sense but doesn't
work....
ActiveSheet.Shapes.SelectAll
ActiveSheet.Shapes("Chart1").Deselect

How do I select all shapes, then deselect Chart1?

Thanx,
- Mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default deselect chart

try ActiveWindow.Visible = False
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
Chart deselect question - Before Print James Charts and Charting in Excel 0 October 21st 09 07:13 PM
Chart Deselect in 2007 lorddah via OfficeKB.com Excel Programming 1 April 24th 08 03:33 PM
code to deselect a chart modified by VBA Brad Excel Programming 2 April 10th 07 06:21 PM
Excel Chart grays out after you deselect it. Mike Miller Charts and Charting in Excel 1 September 18th 06 07:44 PM
How to deselect a selected chart programatically? sr152 Charts and Charting in Excel 3 January 28th 06 03:22 AM


All times are GMT +1. The time now is 07:14 PM.

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

About Us

"It's about Microsoft Excel"