?
Solved

Trim Function

Posted on 2000-04-26
3
Medium Priority
?
183 Views
Last Modified: 2010-05-02
Is it possible to use a Trim function and a Ucase Function on the same line of code?  If so how?
0
Comment
Question by:rickydoyle
3 Comments
 
LVL 7

Expert Comment

by:BarryTice
ID: 2751584
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
 
LVL 3

Expert Comment

by:HATCHET
ID: 2752714
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
 
LVL 1

Accepted Solution

by:
mathies earned 30 total points
ID: 2752974
strNewText = UCase(trim("Allo"))

0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month16 days, 20 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question