Trim Function

Is it possible to use a Trim function and a Ucase Function on the same line of code?  If so how?
rickydoyleAsked:
Who is Participating?
 
mathiesConnect With a Mentor Commented:
strNewText = UCase(trim("Allo"))

0
 
BarryTiceCommented:
dim strStringOne
dim strStringTwo

strStringOne = "   HelLo TherE    "
strStringTwo = UCase(Trim(strStringOne))



This gives you "HELLO THERE" for strStringTwo.

Hope this helps -- b.r.t.
0
 
HATCHETCommented:
rickydoyle,

You can conbine any number of functions together in the same line... including the mixture of your custom functions, VB standard functions, and API declared functions.  For example :

MyVariable = MyFunction(Left(Trim(TestVariable),2))

HATCHET
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.