Re: Left(), Mid(), Right()

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: alpine (alpine_don'tsendspam_at_mvps.org)
Date: 02/14/05


Date: Mon, 14 Feb 2005 14:14:42 -0700

On Mon, 14 Feb 2005 12:29:12 -0800, "Bob Butler"
<tiredofit@nospam.com> wrote:

>"alpine" <alpine_don'tsendspam@mvps.org> wrote in message
>news:h8p111d91upi9ak27c625vbgo1e2ftugm3@4ax.com
>> The way I read your reply, you are talking about the input param.
>> Just to be clear, the "$" designates that the function will *return* a
>> string instead of a variant.
>
>The $ specifies that the argument is a string *and* that the result is a
>string where the non-$ version uses a Variant for both (excluding the
>Replace, Date and Time functions). The non-$ versions will accept a Null as
>the argument and return a Null without error while the $ versions will raise
>an error if given a Null value.

Good catch! In all the years I've been using VB, I don't think I ever
paid attention to the input params for these functions since, I always
only ever use strings with them and, of course, only use the "$"
versions. Must always remember, "The object browser is your friend."
;-)

Bryan
____________________________________________________________
New Vision Software "When the going gets weird,"
Bryan Stafford "the weird turn pro."
alpine_don'tsendspam@mvps.org Hunter S. Thompson -
Microsoft MVP-Visual Basic Fear and Loathing in LasVegas



Relevant Pages

  • Re: Left(), Mid(), Right()
    ... "alpine" wrote in message ... > The way I read your reply, you are talking about the input param. ... > string instead of a variant. ...
    (microsoft.public.vb.general.discussion)
  • Re: Code to delete/unlink Linked tables
    ... Public intLinkODBCTables As Variant, intLinkDB2Tables As Variant ... Public strLinkBackendDB As String, strLinkDSNname As String, strLinkLibName ... ' MsgBox "This database is in MDE format...I will delete/recreate ODBC ... Public Sub fncLinkDB2Table() ...
    (microsoft.public.access.modulesdaovba)
  • Re: OPENFILENAME A P I. User cancels ?
    ... The variable FName will be a Boolean False if no file was selected or a String containing the fully qualified file name if the user selectes a file. ... Const ahtOFN_OVERWRITEPROMPT = &H2 ... Function GetOpenFile(Optional varDirectory As Variant, ... Dim strFilter As String ...
    (microsoft.public.excel.programming)
  • RE: multi-select file dialog
    ... strCustomFilter As String ... Global Const ahtOFN_OVERWRITEPROMPT = &H2 ... Dim strFilter As String ... Function GetOpenFile(Optional varDirectory As Variant, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Replace space in text file
    ... In four of the above cases you have specified which type of variable you want VB to create (Integer, Long, String or whatever). ... in the case of vChars you have not specified the required variable type and VB will therefore create it as a Variant. ... For example, if vChars was an Integer then VB would read two bytes from the file, and if it was a Long it would read four bytes, and if it was a standard variable length String which currently contained nine characters then it would read nine characters from the file and if it was a String that currently contained just one character then it would read one character from the file. ...
    (microsoft.public.vb.general.discussion)