Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
AK AK is offline
external usenet poster
 
Posts: 56
Default Position the shape

Thanks very much. It works for adding one Shape.
If I want to add a msoTextOrientationHorizontal with TEXT ("XXX") on top of
this msoShapeFlowchartDecision, how should I write the code


"JE McGimpsey" wrote:

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


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
Using shape on a frame???? MD Excel Discussion (Misc queries) 1 May 4th 10 04:56 PM
my curser changed from arrow shape to a cross shape???? bj New Users to Excel 1 February 5th 07 02:47 PM
Position of CellCursor on Screen (absolute position) [email protected] Excel Programming 1 November 23rd 05 02:23 AM
Deleting a shape and the cell contents the shape is in. Dave Peterson[_3_] Excel Programming 1 October 9th 03 03:36 PM
Deleting a shape and the cell contents the shape is in. Tom Ogilvy Excel Programming 0 October 9th 03 03:43 AM


All times are GMT +1. The time now is 02:08 AM.

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

About Us

"It's about Microsoft Excel"