Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VBA Shapes

13 views
Skip to first unread message

NPell

unread,
Sep 10, 2009, 8:05:05 AM9/10/09
to
Hi all,

Im trying to create a macro to create a shape, based on cell
references.

Creating the shape is fine, but its pulling in the cell values for the
shape size that is proving difficult.
I have the following, which doesnt work, but might give you an idea of
what im trying to achieve.

shpht = Range("K2").Value
shpwd = Range("K3").Value

ActiveSheet.Shapes.AddShape(msoShapeRectangle, 0, 0#, shpwd,
shpht).
Select

Can anybody help?

NPell

unread,
Sep 10, 2009, 8:06:59 AM9/10/09
to

Oh, it does work, its the syntax that was wrong, no underscore to lead
to the Select on the next line.
Sorry all.

0 new messages