Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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" wrote in message
...
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
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
How to retrieve certain char within a string? Eric Excel Discussion (Misc queries) 1 July 3rd 07 03:02 AM
How to verify the first char of the string in excel? Eric Excel Discussion (Misc queries) 0 November 30th 06 03:57 AM
sql string, +'/'+convert(char(3)..) doristsr Excel Programming 3 June 29th 06 08:34 AM
string/char CONTAINS function? jim sturtz Excel Worksheet Functions 3 May 31st 06 07:20 PM
last char of a string Buddy Lee Excel Programming 9 November 11th 05 02:02 AM


All times are GMT +1. The time now is 11:50 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"