Log in

View Full Version : Solved: Set the width of a text box



will1128
09-01-2010, 02:28 PM
Can someone tell me how to set the width of my created text box?


Cell(8, 1).Merge MergeTo:=.Cell(8, 2)
.Cell(8, 1).Range.Text = "E-mail"
.Cell(8, 2).Merge MergeTo:=.Cell(8, 7)
.Cell(8, 2).Range. _
InlineShapes.AddOLEControl ClassType:="Forms.TextBox.1"
InlineShapes(.InlineShapes.Count).Width = 50


I get the error message :
Compile Error: Method or data member not found

geekgirlau
09-01-2010, 04:07 PM
.Cell(8, 1).Merge MergeTo:=.Cell(8, 2)
.Cell(8, 1).Range.Text = "E-mail"
.Cell(8, 2).Merge MergeTo:=.Cell(8, 7)
.Cell(8, 2).Range. _
InlineShapes.AddOLEControl ClassType:="Forms.TextBox.1"
ActiveDocument.InlineShapes(ActiveDocument.InlineShapes.Count).Width = 50

will1128
09-02-2010, 06:06 AM
This worked. Thank you.