Solved

Trim Function

Posted on 2000-04-26
3
178 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 10 total points
ID: 2752974
strNewText = UCase(trim("Allo"))

0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

828 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