Cell to macro

E

eLaCiD

Hallo all

Is there a way content from cell (for example content of A1, A2, A3 and A4) put in macro :

Sub MakroN1()

ActiveSheet.Shapes.AddShape(msoShapeRectangle, A1, A2, A3, A4). _
Select
End Sub

In short, as you can see, intent is that cell contents through macro command draw a square.
 
D

Dave Peterson

With no checking to make sure the values make sense:

Sub MakroN1()
with activesheet
.Shapes.AddShape(msoShapeRectangle, _
.range("A1").value, _
.range("A2").value, _
.range("A3").value, _
.range("A4").value).Select
end with
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top