Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert text to LCase 2

Status
Not open for further replies.

optjco

IS-IT--Management
Apr 13, 2004
185
GB
I am using SYSGetUserName to populate a label on a form with the appropiate username however this could be in one of three different cases i.e.

JBloggs
jbloggs
JBLOGGS

I would like to be able to convert the name to lowercase at all times

This is how I populate the label now

lblUserName.Caption = SYSGetUserName

could someone suggest how I would change it so that it does change to lowercase please

Regards

Olly
 
How about
Code:
lblUserName.Caption = StrConv(SYSGetUserName,vbLowerCase)
Hope this helps

Harleyquinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
Another way:
lblUserName.Caption = LCase(SYSGetUserName)

You may also consider this:
lblUserName.Caption = LCase(Environ("UserName"))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
HarleyQuinn/PHV
Thank you both for your suggestions, I will try them both tomorrow

Regards

Olly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top