+ Reply to Thread
Results 1 to 2 of 2

String parameter including blank char

  1. #1
    Jean-Pierre Bidon
    Guest

    String parameter including blank char

    Hi,
    I'd like to put a string argument in a function. Let's say:

    Function MyFun(lib as String) as Boolean

    The problem comes when there is blank character in the argument "lib".
    Is it possible to overcome this problem.

    Thanks in advance.

    --
    Jean-Pierre Bidon
    Interstat
    5 place de la République
    75003 Paris
    Tél: 01 45 49 19 17



  2. #2
    NickHK
    Guest

    Re: String parameter including blank char

    Jean-Pierre,
    What do mean by a blank character ?Does this work for you?
    Private Sub CommandButton1_Click()
    Dim i As Long
    For i = 0 To 255
    Debug.Assert LenTest("123" & Chr(i) & "567") = 7
    Next
    End Sub

    Function LenTest(argStr As String) As Long
    LenTest = Len(argStr)
    End Function

    NickHK

    "Jean-Pierre Bidon" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi,
    > I'd like to put a string argument in a function. Let's say:
    >
    > Function MyFun(lib as String) as Boolean
    >
    > The problem comes when there is blank character in the argument "lib".
    > Is it possible to overcome this problem.
    >
    > Thanks in advance.
    >
    > --
    > Jean-Pierre Bidon
    > Interstat
    > 5 place de la République
    > 75003 Paris
    > Tél: 01 45 49 19 17
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1