Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    easy question of the day (access97)

    how do i put a new line in a label via VBA ?
    i have tried vbCR and Chr(10) and Chr(13) but the two pieces of text still end up stuck together rather than on two lines <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: easy question of the day (access97)

    Hi,
    Try using vbcrlf - it works for me in A2K.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: easy question of the day (access97)

    well whaddya know, it works in 97 too

    thank you very much

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: easy question of the day (access97)

    It should work with chr(13) and chr(10) too but I think you have to put them that way round.
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    Star Lounger
    Join Date
    Dec 2001
    Location
    Fredensborg, Denmark
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: easy question of the day (access97)

    Try vbNewline for size

    I have two public constants always declared in my applications:

    Public Const cNl = vbNewLine
    Public Const c2Nl = cNl & cNl

    They are easier to type (if used often).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •