PC Review


Reply
Thread Tools Rate Thread

deselect one of the shapes

 
 
already
Guest
Posts: n/a
 
      11th Nov 2008
Hello

After selecting all my (random) shapes on a sheet with the command

ActiveSheet.Shapes.SelectAll

I want to deselect one of them. I thought that the following code could do
the work but I turn in an error (object doesn't support the method)

ActiveSheet.Shapes("Picture 1").Deselect

What's the way to work around this

Thanks in advance for your help

Kind regards

Al
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      11th Nov 2008
Just select a worksheet cell, say A1


Range("A1").Select

--
__________________________________
HTH

Bob

"already" <(E-Mail Removed)> wrote in message
news:8FAFB7B4-A625-4431-BAC9-(E-Mail Removed)...
> Hello
>
> After selecting all my (random) shapes on a sheet with the command
>
> ActiveSheet.Shapes.SelectAll
>
> I want to deselect one of them. I thought that the following code could do
> the work but I turn in an error (object doesn't support the method)
>
> ActiveSheet.Shapes("Picture 1").Deselect
>
> What's the way to work around this
>
> Thanks in advance for your help
>
> Kind regards
>
> Al



 
Reply With Quote
 
already
Guest
Posts: n/a
 
      11th Nov 2008
Hi Bob

Thanks for the reply but this didn't work.

Note that all the shapes are selected and that I only want to remove the
selection of 1 of them

Kind regards

Al


"Bob Phillips" wrote:

> Just select a worksheet cell, say A1
>
>
> Range("A1").Select
>
> --
> __________________________________
> HTH
>
> Bob
>
> "already" <(E-Mail Removed)> wrote in message
> news:8FAFB7B4-A625-4431-BAC9-(E-Mail Removed)...
> > Hello
> >
> > After selecting all my (random) shapes on a sheet with the command
> >
> > ActiveSheet.Shapes.SelectAll
> >
> > I want to deselect one of them. I thought that the following code could do
> > the work but I turn in an error (object doesn't support the method)
> >
> > ActiveSheet.Shapes("Picture 1").Deselect
> >
> > What's the way to work around this
> >
> > Thanks in advance for your help
> >
> > Kind regards
> >
> > Al

>
>
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      11th Nov 2008
I would just loop through the shapes:

Option Explicit
Sub testme()
Dim Shp As Shape
Dim InitialShape As Boolean

InitialShape = True
For Each Shp In ActiveSheet.Shapes
If Shp.Name = "Button 3" Then
'skip it
Else
Shp.Select Replace:=InitialShape
InitialShape = False
End If
Next Shp
End Sub


already wrote:
>
> Hello
>
> After selecting all my (random) shapes on a sheet with the command
>
> ActiveSheet.Shapes.SelectAll
>
> I want to deselect one of them. I thought that the following code could do
> the work but I turn in an error (object doesn't support the method)
>
> ActiveSheet.Shapes("Picture 1").Deselect
>
> What's the way to work around this
>
> Thanks in advance for your help
>
> Kind regards
>
> Al


--

Dave Peterson
 
Reply With Quote
 
already
Guest
Posts: n/a
 
      11th Nov 2008
Hi Dave

That's a nice one. Thanks very much !!!

All

"Dave Peterson" wrote:

> I would just loop through the shapes:
>
> Option Explicit
> Sub testme()
> Dim Shp As Shape
> Dim InitialShape As Boolean
>
> InitialShape = True
> For Each Shp In ActiveSheet.Shapes
> If Shp.Name = "Button 3" Then
> 'skip it
> Else
> Shp.Select Replace:=InitialShape
> InitialShape = False
> End If
> Next Shp
> End Sub
>
>
> already wrote:
> >
> > Hello
> >
> > After selecting all my (random) shapes on a sheet with the command
> >
> > ActiveSheet.Shapes.SelectAll
> >
> > I want to deselect one of them. I thought that the following code could do
> > the work but I turn in an error (object doesn't support the method)
> >
> > ActiveSheet.Shapes("Picture 1").Deselect
> >
> > What's the way to work around this
> >
> > Thanks in advance for your help
> >
> > Kind regards
> >
> > Al

>
> --
>
> Dave Peterson
>

 
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
excel document with shapes on it but the shapes do not print franharvey@sympatico.ca Microsoft Excel Worksheet Functions 2 22nd Oct 2009 06:17 PM
Naming Auto Shapes and Creating new Shapes =?Utf-8?B?QUwyMDAw?= Microsoft Excel Misc 3 10th Sep 2007 04:12 AM
Adding customized shapes to shapes toolbar =?Utf-8?B?amFtZXNfY2hpbGxp?= Microsoft Powerpoint 2 24th Jul 2007 04:16 AM
When drawing shapes in excel the shapes keep disappearing =?Utf-8?B?VGFwZQ==?= Microsoft Excel Misc 1 6th Oct 2006 04:23 PM
ActiveChart.Deselect won't Deselect Mark Stephens Microsoft Excel Charting 2 16th Jun 2005 02:54 AM


Features
 

Advertising
 

Newsgroups
 


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