Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Evaluating if a Shape is a line or a shape

Hi,

Is it possible to find out if a selected shape is just a line or a shape
(i.e. has a line color and fill color)

Thanks!



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Evaluating if a Shape is a line or a shape

Sanjay,

I think you can check the Type property of the shape. If it's msoLine, then
it's a line.

Sub test()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If shp.Type = msoLine Then
'this is a line
Debug.Print shp.Name & " is a line."
End If
Next shp
End Sub

--
Hope that helps.

Vergel Adriano


"Sanjay" wrote:

Hi,

Is it possible to find out if a selected shape is just a line or a shape
(i.e. has a line color and fill color)

Thanks!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Evaluating if a Shape is a line or a shape

Thanks Vergel !



"Vergel Adriano" wrote in message
...
Sanjay,

I think you can check the Type property of the shape. If it's msoLine,
then
it's a line.

Sub test()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If shp.Type = msoLine Then
'this is a line
Debug.Print shp.Name & " is a line."
End If
Next shp
End Sub

--
Hope that helps.

Vergel Adriano


"Sanjay" wrote:

Hi,

Is it possible to find out if a selected shape is just a line or a shape
(i.e. has a line color and fill color)

Thanks!







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
Positioning a drawn line shape on a chart Tammy Charts and Charting in Excel 3 September 8th 08 03:04 PM
my curser changed from arrow shape to a cross shape???? bj New Users to Excel 1 February 5th 07 02:47 PM
Insert a line or shape in a table Parkrose Charts and Charting in Excel 1 November 5th 05 03:37 AM
Deleting a shape and the cell contents the shape is in. Dave Peterson[_3_] Excel Programming 1 October 9th 03 03:36 PM
Deleting a shape and the cell contents the shape is in. Tom Ogilvy Excel Programming 0 October 9th 03 03:43 AM


All times are GMT +1. The time now is 06:54 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"