View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
jsd219 jsd219 is offline
external usenet poster
 
Posts: 68
Default determine if first word of cell is capitalized

Thank you, :-)

God bless
jsd219


Helmut Weber wrote:
Hi,

how about this one:

Public Function bCap(sTmp As String) As Boolean
Dim sChr As String
bCap = False
sChr = Left(sTmp, 1)
If UCase(sChr) = sChr Then bCap = True
End Function

You may have to add some error handling,
in case you have to deal with an empty string, too.

HTH

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"