Proper

P

Peo Sjoblom

There is none so you can use

Application.Proper(Range("A1"))

as an example

Regards,

Peo Sjoblom
 
D

David McRitchie

Hi ....,
and if you would like to refine and improve usage in your macro
for lastnames such as my own, and for a correct title case as
in "A Year to Remember" take a look at
http://www.mvps.org/dmcritchie/excel/proper.htm
You would still have to make some adjustments but that should
get you a better start.
 
D

Dave Peterson

VBA has its own builtin function, too:

Option Explicit
Sub testme()
Dim myStr As String
myStr = "now is the TIME FOr all good MEN TO COME..."
myStr = StrConv(myStr, vbProperCase)
MsgBox myStr
End Sub
 
M

Mike H

Try this,

Range("A1").Value=Application.WorksheetFunction.Proper(Range("A1").Value)

Mike
 
R

Rick Rothstein \(MVP - VB\)

Specifically (to match Mike's example)...

Range("A1").Value = StrConv(Range("A1").Value, vbProperCase)

where the predefined vbProperCase constant tells it to perform the proper
case conversion.

Rick
 
Top