Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 3 of 3

Thread: Inserting Carriage Return in text strings

  1. #1
    Join Date
    23rd September 2003
    Location
    York
    Posts
    880

    Inserting Carriage Return in text strings

    Good Morning All,

    I have been using Chr(10) to insert carriage returns in strings which I can then display in text boxes on a userform. Unfortunately since I've been upgraded to XP I no longer have the ActiveX add-in which my PC tells me is the missing library.

    Does anyone know how to insert carriage returns without using Chr ?

    Thanks

    John

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,697
    Hi John

    Try

    MsgBox "hello" & vbLf & "world"

    See Miscellaneous Constants in the VBA help for many more.

    However, if you run this code
    MsgBox "hello" & chr(13) & "world"

    you should only need to go to Tools>References (while in the VBE) and check the reference that is preceded with the word missing.

  3. #3
    Join Date
    23rd September 2003
    Location
    York
    Posts
    880
    Hi Dave,

    It is the "ActiveEx type library" that is missing. Our IT systems people won't even think about putting it back as they are scared of the dark, spiders and express surprise every time the sun comes up.

    And now with added vbLf my app works again, well, nearly. Still can't get excell to talk to word via "Set wordApp = GetObject(, "Word.Application")" for exactly the same reason. I think I'll just get a worksheet to look like the letter I want and print that instead.

    Thanks for the vbLf tho'

    John

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Remove Last Carriage Return From Text File
    By Arianna in forum EXCEL HELP
    Replies: 2
    Last Post: August 22nd, 2008, 06:44
  2. Replace Line Feed With Carriage Return In Text File
    By ghisirds in forum EXCEL HELP
    Replies: 5
    Last Post: September 13th, 2007, 17:20
  3. Deleting Text After Carriage Return
    By kevinpoinen in forum EXCEL HELP
    Replies: 6
    Last Post: October 25th, 2006, 16:37
  4. Inserting Carriage Return Character in Formulas
    By raizor in forum EXCEL HELP
    Replies: 3
    Last Post: September 17th, 2005, 04:52
  5. Delimited text by carriage return?
    By bobwhosmiles in forum EXCEL HELP
    Replies: 3
    Last Post: June 4th, 2004, 23:51

Bookmarks

Posting Permissions

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