#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    1
    Rep Power
    0

    Question line breaks in (auto)shapes


    Hi,

    my problem is the following, my code generates shapes (msoshape...) in excel on the fly. problem occurs when i insert the text into the shapes using

    shape.textframe.characters.text = str

    when I try to insert a line break VbCr I get a | in the field instead of a cr, using VbCrLf gives a line break but also inserts a | at the end of the previous line. since there is no multiline property to be set on a shape object i'm stuck .... any ideas ?
    Last edited by wiegels; May 15th, 2003 at 02:51 AM.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    1
    Rep Power
    0
    Use Chr(10) like so:

    my_Shape.TextFrame.Characters.Text = "Line 1" & Chr(10) & "Line 2"
  4. #3
  5. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    You have three constants
    VbCr <-- carriage return
    VbLf <-- Line feed
    VbCrLf <-- carriage return & line feed

    Try using VbLf (which is just another way of saying Chr(10) )

IMN logo majestic logo threadwatch logo seochat tools logo