PC Review


Reply
Thread Tools Rate Thread

deselect chart

 
 
MikeF
Guest
Posts: n/a
 
      22nd Jan 2010

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
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      22nd Jan 2010
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" <(E-Mail Removed)> wrote in message
news:050FE605-BA9F-477B-AAE2-(E-Mail Removed)...
>
> 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



 
Reply With Quote
 
Fan924
Guest
Posts: n/a
 
      22nd Jan 2010
try ActiveWindow.Visible = False
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Chart Deselect in 2007 Jon Peltier Microsoft Excel Programming 0 24th Apr 2008 03:33 PM
Excel Chart grays out after you deselect it. =?Utf-8?B?TWlrZSBNaWxsZXI=?= Microsoft Excel Charting 1 18th Sep 2006 07:44 PM
How to deselect a selected chart programatically? =?Utf-8?B?c3IxNTI=?= Microsoft Excel Charting 3 28th Jan 2006 03:22 AM
deselect chart with keyboard H Microsoft Excel Misc 0 23rd Aug 2004 05:36 PM
What VBA Stmt Will Deselect a Chart? SidBord Microsoft Excel Charting 2 12th Jun 2004 11:43 PM


Features
 

Advertising
 

Newsgroups
 


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