a string object

D

Daniel

Hello, How do I setup a string object in a function receiving a string
parameter?

Thank you

Daniel
 
E

Edwin Tam (MS MVP)

In the simple example below, "tmp" is the variable (parameter/arguement) which is a string

Function sample(tmp As String
sample = tm
End Functio
 
C

Chip Pearson

Daniel,

I'm not sure what your question is, but perhaps the following
will be of some limited use.

Public Function TheFunction(S As String) As String
Dim St As String
St = UCase(S)
TheFunction = St
End Function

You might want to provide a bit more details about what you are
trying to accomplish.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
D

Daniel

While replying to include the code, it just struck me that I was using the
variable name between "" while I should not have. Thanks, I don't have any
problem now.
_____________
 
Top