Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default deselect one of the shapes

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default deselect one of the shapes

Just select a worksheet cell, say A1


Range("A1").Select

--
__________________________________
HTH

Bob

"already" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default deselect one of the shapes

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" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default deselect one of the shapes

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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default deselect one of the shapes

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
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
excel document with shapes on it but the shapes do not print [email protected] Excel Worksheet Functions 2 October 22nd 09 06:17 PM
Naming Auto Shapes and Creating new Shapes AL2000 Excel Discussion (Misc queries) 3 September 10th 07 04:12 AM
When drawing shapes in excel the shapes keep disappearing Tape Excel Discussion (Misc queries) 1 October 6th 06 04:23 PM
ActiveChart.Deselect won't Deselect Mark Stephens Charts and Charting in Excel 2 June 16th 05 02:54 AM
How can i get more 3D shapes for Auto shapes in excel? Ajey Excel Discussion (Misc queries) 0 March 3rd 05 09:53 AM


All times are GMT +1. The time now is 04:32 AM.

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"