I think "Function CR() As String" is somewhat less verbose.
This approach is also useful with HT, SP, LF, CRLF, EOL, etc. It is also
useful to employ them with defaults. For example:
Function CR(numChrs As Integer = 1)
Dim i as Integer
Dim chrTxt As String
For i = 1 to numChrs
chrTxt = chrTxt + chr(13)
Next
Return chrTxt
End Function
Calling:
msg = "Blah"
msg = msg + CR + "Wahhhh..."
or...
msg = "Blah" + CR(3) + "Wahhhh..."
I keep this stuff in a generic, reusable module 'globalTextFunctions'.
PWH
**************************************************
on 6/30/04 8:59 AM, Deane Venske at deane dot lists at eduss dot com wrote:
> Hey Steve,
>
> Have you tried EndOfLine? This usually works a treat. Alternatively just
> make a module and a method like :
>
> Function CharThirteen() As String
> Return Chr(13)
> End Function
>
> That way you can always use CharThirteen and it will just be whatever the
> return is.
>
> Deane
>
>> Hi List.
>>
>> Quick one.
>>
>> I'm trying to assign a constant for Chr(13) and the like. How is this
>> done, I'm going around in circles here.
>>
>> Thanks,
>>
>> Steven Taylor
>> Melbourne, Australia.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|