View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Position the shape

One way (without the unnecessary selection):

With ActiveSheet.Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
With .Parent.Shapes.AddShape( _
Type:=msoShapeFlowchartDecision, _
Left:=3.75, _
Top:=.Top, _
Width:=138.75, _
Height:=95.25)
.TextFrame.Characters.Text = "xxx"
End With
End With


In article ,
ak wrote:

May I know what should be code to add
msoShapeFlowchartDecision,msoTextOrientationHorizo ntal

The shape should be right under the last used row. For example.
The last used row is 15, then these 2 shape will be added in range(A16)

I have used the following to add the shape, but the shape is then added in
the fixed position
ActiveSheet.Shapes.AddShape(msoShapeFlowchartDecis ion, 3.75, 651#, 138.75, _
95.25).Select
' ActiveSheet.Shapes.AddTextbox(msoTextOrientationHo rizontal, 26.25,
688.5, _
94.5, 24#).Select
Selection.Characters.Text = "XXX"

Thanks for your help in advance