need to read selection.shapes.range(array) values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm writing a macro that will rearrange a group of selected drawn rectangles.
I need to select the rectangles and execute the macro which will modify an
array that contains the rectangle coordinates. The rectangles will be deleted
and redrawn in their new positions. Stacking random boxes may be a better way
to put it.

capturing the selection gives me:

ActiveSheet.Shapes.Range(Array(" 62", " 63", " 64", " 65" _
, " 66", " 67")).Select

The macro i'm trying to execute is:

Dim mr(100)

With Selection
num = .Count ' return number of rectangles (this works)
for i = 1 to num
sr = .Item(i) ' this should return " 62" but it doesn't :(
need help here)
mr(i) = Val(sr)
Next i
End With

Any help or ideas would be greatly appreciated.
 
You'd be better off asking this in a newsgroup related to Excel.

This newsgroup is for questions about macros in Access, the database product
that's part of Office Professional. Macros in Access bear no resemblance to
macros in Excel.
 
oops, ty
--
Best Regards,

Harry


Douglas J. Steele said:
You'd be better off asking this in a newsgroup related to Excel.

This newsgroup is for questions about macros in Access, the database product
that's part of Office Professional. Macros in Access bear no resemblance to
macros in Excel.
 
Back
Top