?
Solved

Trim Function

Posted on 2000-04-26
3
Medium Priority
?
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 6 hours left to enroll

764 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