ker_01
2/11/2010 10:14:00 PM
The second code I posted was specific to the issue you had with Excel 2007,
but was not intended to be a complete solution (it was provided so you could
integrate it with the code from post #1 to create a complete solution).
If you are just trying to get this to work in 2007, then you just need to
assign the value to the textbox:
> Sub MakeTextBoxes()
>
> NumberOfRowsToProcess = 5
> FixedRowHeight = 10
> FixedLeftSide = 80
> FixedWidth = 50
>
> For MyRow = 1 To 2
> ActiveSheet.Range("A" & MyRow).Select
> tText = Sheet1.Range("A" & MyRow).Value
>
> ActiveSheet.Shapes.AddLabel( _
> msoTextOrientationHorizontal, _
> ActiveSheet.Range("D5").Left, _
> ActiveSheet.Range("D5").Top, _
> 96.75, _
> 17.25).Select
Selection.text = tText
> With Selection.Font
> .Name = "Arial"
> .Size = 10
> End With
> Next
>
> End Sub
"Quin" wrote:
> Using K Macd's tips I was able to create a blank text box. I tried as best I
> could to put the code snippits together to have text from Column A go into
> the text box but it only creates the empty text box. Here is what I put
> together.
>
> Sub MakeTextBoxes()
>
> NumberOfRowsToProcess = 5
> FixedRowHeight = 10
> FixedLeftSide = 80
> FixedWidth = 50
>
> For MyRow = 1 To 2
> ActiveSheet.Range("A" & MyRow).Select
> tText = Sheet1.Range("A" & MyRow).Value
>
> ActiveSheet.Shapes.AddLabel( _
> msoTextOrientationHorizontal, _
> ActiveSheet.Range("D5").Left, _
> ActiveSheet.Range("D5").Top, _
> 96.75, _
> 17.25).Select
>
>
> With Selection.Font
> .Name = "Arial"
> .Size = 10
> End With
> Next
>
> End Sub
>
> At least it compiles now...
>
> Quin
>
>