Visual Basic and Visual FoxPro functions to change the case of text

VBA

UCase(), LCase(), StrConv()

VFP

Upper(), Lower(), Proper()

Common Syntax Notes

The straightforward case-conversion routines work in the same way in both languages. In Visual FoxPro the Proper() function returns the string with the first letter of each word capitalised. In VBA the StrConv() function with a parameter of 3 does the same.

Note that neither of these last two functions are as useful as they might seem. You cannot use them to tidy up the poor capitalisation of a list of names because they blindly capitalise the first letter of each word. For example:

?Proper("MCCARTNEY")

will give you "Mccartney" and you'll get similarly unhelpful results from "DICAPRIO" and "IBM".

Finding characters  |  Text functions  |  Changing characters

Related Items

VFP and VBA.

The Visual FoxPro and Visual Basic for Applications languages are similar but there are annoying differences between them.

Read More

Text delimiters in VBA and VFP.

Visual Basic for Applications and Visual FoxPro delimiters for strings.

Read More

Text concatenation in VBA and VFP

Visual Basic for Applications and Visual FoxPro operators to concatenate text.

Read More

Text substrings in VBA and VFP

Visual Basic for Applications and Visual FoxPro functions to extract substrings from within a string of text

Read More

Trimming text in VBA and VFP

Visual Basic for Applications and Visual FoxPro functions to trim leading and trailing spaces from string of text

Read More