#1   Report Post  
Posted to microsoft.public.excel.misc
famdamly
 
Posts: n/a
Default Identifying


How can I get the name, size and position coordinates of all the objects
in an area (such as the screen) to be entered into a list.
For example let's say we drew 4 shapes. A square, a circle a triangle
and a rectangle. Then let's say I moved these objects around on the
screen, resized the triangle and cut the circle.

Now I need a macro that will identify the names of the shapes that are
left on the screen and give me the sizes of each shape and their
location.


--
famdamly
------------------------------------------------------------------------
famdamly's Profile: http://www.excelforum.com/member.php...o&userid=29382
View this thread: http://www.excelforum.com/showthread...hreadid=516598

  #2   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default Identifying

One way:

Public Sub GetShapes()
Dim vShape As Variant
Dim i As Long
With ActiveSheet.Shapes
If .Count 0 Then
ReDim vShape(1 To .Count, 1 To 5)
For i = 1 To .Count
vShape(i, 1) = .Item(i).Name
vShape(i, 2) = .Item(i).Top
vShape(i, 3) = .Item(i).Left
vShape(i, 4) = .Item(i).Height
vShape(i, 5) = .Item(i).Width
Next i
.Parent.Range("A1").Resize(1, 5) = _
Array("Name", "Top", "Left", "Height", "Width")
.Parent.Range("A2").Resize(.Count, 5).Value = vShape
End If
End With
End Sub




In article ,
famdamly wrote:

How can I get the name, size and position coordinates of all the objects
in an area (such as the screen) to be entered into a list.
For example let's say we drew 4 shapes. A square, a circle a triangle
and a rectangle. Then let's say I moved these objects around on the
screen, resized the triangle and cut the circle.

Now I need a macro that will identify the names of the shapes that are
left on the screen and give me the sizes of each shape and their
location.

  #3   Report Post  
Posted to microsoft.public.excel.misc
famdamly
 
Posts: n/a
Default Identifying


Wow, that works superbly well. I'm amazed, I wish I could make this
stuff seem so easy. I've searched the vba help feature for quite some
time looking for ways to do any of that to no avail. Thanks a bunch for
all of the frustration you spared me.


--
famdamly
------------------------------------------------------------------------
famdamly's Profile: http://www.excelforum.com/member.php...o&userid=29382
View this thread: http://www.excelforum.com/showthread...hreadid=516598

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
Identifying Cells with formulas VETcalc Excel Worksheet Functions 2 August 13th 05 06:49 AM
vba, identifying a range Danny Excel Worksheet Functions 1 August 2nd 05 08:17 PM
Pivot Table - identifying datasource halemweg Excel Discussion (Misc queries) 1 July 1st 05 07:03 PM
Hyperlinks - identifying source in destination sheet UniDave Excel Discussion (Misc queries) 0 November 25th 04 10:07 PM
Identifying exact values in alternate rows YG Excel Worksheet Functions 1 November 2nd 04 11:25 PM


All times are GMT +1. The time now is 07:59 AM.

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

About Us

"It's about Microsoft Excel"