String parameter including blank char

J

Jean-Pierre Bidon

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
 
N

NickHK

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top