I view it as "just in case" code.
No pun intended.
Gord
On Sun, 17 Feb 2008 18:14:38 -0000, "RB Smissaert"
<(E-Mail Removed)> wrote:
>Sure, I hardly ever use formula's so tend to overlook that and thanks for
>the correction.
>
>RBS
>
>"Gord Dibben" <gorddibbATshawDOTca> wrote in message
>news:(E-Mail Removed)...
>>I would try something like that if I wanted all formulas on all sheets
>>wiped
>> out.
>>
>> For one sheet I would use this to change case and preserve formulas, if
>> any
>> present.
>>
>> Sub Proper_Case()
>> Dim rng As Range
>> Set rng = Nothing
>> On Error Resume Next
>> Set rng = Cells.SpecialCells(xlCellTypeConstants)
>> On Error GoTo 0
>> If rng Is Nothing Then
>> Else
>> rng.Formula = Application.Proper(rng.Formula)
>> End If
>> End Sub
>>
>>
>> Gord Dibben MS Excel MVP
>>
>> On Sun, 17 Feb 2008 11:50:06 -0000, "RB Smissaert"
>> <(E-Mail Removed)> wrote:
>>
>>>Try something like this:
>>>
>>>Sub test()
>>>
>>> Dim sh As Worksheet
>>> Dim rng As Range
>>> Dim c As Range
>>>
>>> For Each sh In ThisWorkbook.Worksheets
>>> With sh
>>> Set rng = Range(.Cells(1), _
>>> .Cells(1).SpecialCells(xlLastCell))
>>> For Each c In rng.Cells
>>> If Not IsEmpty(c) Then
>>> c.Value = _
>>> Application.WorksheetFunction.Proper(c.Value)
>>> End If
>>> Next c
>>> End With
>>> Next sh
>>>
>>>End Sub
>>>
>>>
>>>RBS
>>>
>>>
>>>
>>>"Rahim" <(E-Mail Removed)> wrote in message
>>>news:7FF02107-65A0-4396-BC06-(E-Mail Removed)...
>>>>I am preparing a report in MS Excel with many sheets. I have typed it
>>>>all
>>>> in capital letters. Now, I need to chage it to lower cases with the
>>>> first
>>>> letter in capital. Pls tell me a tip to solve it.
>>
|