LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default What are the character codes of a carriage return entered in a comment?

Hi David,

Try this demo:

Public Sub TestLineFeeds()

Dim Arr As Variant, arr2 As Variant
Dim i As Long

Arr = Array(Chr(10), vbLf, Chr(13), vbCr, vbNewLine, _
vbCr + vbLf, vbCrLf, vbLf + vbCr)

arr2 = Array("Chr(10)", "vbLf", "Chr(13)", "vbCr", "vbNewLine", _
"vbCr + vbLf", "vbCrLf", "vbLf + vbCr")
For i = LBound(Arr) To UBound(Arr)
Cells(i + 1, 1).Value = "Norman" & Arr(i) & "Jones"
Cells(i + 1, 2) = arr2(i)
Next i

End Sub

---
Regards,
Norman



"davidm" wrote in
message ...

David,

In VBA, I have long fallen into the habit of using the following
interchangeably to move to the next line:

* Chr(10)*
* Chr(13)*
*VbCrLf*
*VbCr*
*VBLf*
*VbNewLine *

Have I taken too much for granted?


--
davidm
------------------------------------------------------------------------
davidm's Profile:
http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=391164





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Carriage return character in combobox SteveZmyname Excel Discussion (Misc queries) 0 March 12th 10 04:32 PM
How to remove or replace a carriage return character in a cell? Patty Excel Discussion (Misc queries) 2 July 26th 05 06:25 PM
Function to return Character Position of Xth character within a string Andibevan[_2_] Excel Programming 4 June 9th 05 03:24 PM
How do I ignore newline character/carriage return while importing Achal Excel Discussion (Misc queries) 6 March 24th 05 02:24 AM
Carriage return in comment not working dumbass Excel Programming 5 June 1st 04 11:11 PM


All times are GMT +1. The time now is 08:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"