View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Robin Hammond Robin Hammond is offline
external usenet poster
 
Posts: 79
Default Text paragraphs and image

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(msoTextOrientationHo rizontal, 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


"Mika" wrote in message
...
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