View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Sentence Capitalizatio

somebody posted an answer last year for you. did it work?

http://www.ozgrid.com/forum/showthread.php?t=77385

--


Gary


"Minitman" wrote in message
...
Hey Gary,

Thanks for the reply.

If I understand your code, it is forcing the format of cell A1 into
the 1st character being uppercase, and everything else to be
lowercase, is that correct?

I think a better description of my problem is in order

First, these TextBoxes are on a UserForm, not a sheet.
Second, the TextBoxes are being used as memo fields. There could be
many sentences in 1 TextBox not just one.

I was given code snippet as a possible solution awhile back, but I
didn't check it out:

TextBox1.Text = Application.AutoCorrect.CorrectSentenceCap = True

This appears to only turn on the AutoCorrect.CorrectSentenceCap
property according to the MS help file. Other then that, I don't
know!

Any other ideas?

-Minitman



On Sun, 6 Jul 2008 20:17:11 -0400, "Gary Keramidas"
<GKeramidasATmsn.com wrote:

this will do the same thing,
With Range("A1")
.Value = UCase(Left(.Value, 1)) & Mid(LCase(.Value), 2,
Len(.Value))
End With

--


Gary


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
this may do what you want

Sub test()
With Range("A1")
.Value = LCase(.Value)
.Value = UCase(Left(.Value, 1)) & Mid(.Value, 2, Len(.Value))
End With
End Sub


--


Gary


"Minitman" wrote in message
...
Greetings,

How Do I use "Application.AutoCorrect.CorrectSentenceCap". I can't
seem to get it to work!

Or is there a different way to get the contents of a TextBox to
convert to correct sentence structure with the first letter of each
sentence to be capitalized and the rest lower case?

Any help will be appreciated.

-Minitman