Text paragraphs and image

  • Thread starter Thread starter Mika
  • Start date Start date
M

Mika

Hello,

I have an Excel 97 sheet which has an image.

How can I use VBA to write text over the image? I guess I have to add a
text box first but don't know how to do it.

Can I do that? Is it possible to write several paragraphs and indent the
first one?

Thanks,
Mika
 
This is an adjustment of something that I did with the macro recorder. I
don't think that the text boxes allow for indented paragraphs, but you can
have line breaks.

Sub Macro1()

Range("a1").Select
ActiveSheet.Pictures.Insert("C:\A picture.jpg").Select
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 224.25, 118.5, _
201#, 108.75).Select
With Selection
.Characters.Text = "Text" & Chr(10) & "whatever"
.ShapeRange.Fill.Visible = msoFalse
.ShapeRange.Line.Visible = msoFalse
End With

End Sub

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in
 
Back
Top