ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 2000: VB code for changing caseof text (https://www.excelbanter.com/excel-programming/346777-excel-2000-vbulletin-code-changing-caseof-text.html)

pgnl

Excel 2000: VB code for changing caseof text
 
I am hoping some kind person can help me with this Excel 2000 problem......

I need a short piece of VB code I can attach to a Button in the tool bar,
such that when I select a cell containing text it converts it from capitals
to small case or even better, capitalise just the first character of the
sentence (or alternatively work like the 'proper' function capitalise the
first letter of each word...)

I can do this easily in Word by pressing shift-F3, but there does not appear
to be a similar function in Excel 2000.

Thanks for your help.


Patrick
Worcestershire, UK



Tom Ogilvy

Excel 2000: VB code for changing caseof text
 
ActiveCell.Value = strConv(ActiveCell.Value, vbProperCase)

or use vbLowerCase or vbUpperCase

or for the first character

Dim sStr as String
sStr = strConv(ActiveCell.Value,vbLowerCase)
sStr = ucase(left(sStr,1) & Mid(sStr,2)


--
Regards,
Tom Ogilvy


"pgnl" wrote in message
. uk...
I am hoping some kind person can help me with this Excel 2000

problem......

I need a short piece of VB code I can attach to a Button in the tool bar,
such that when I select a cell containing text it converts it from

capitals
to small case or even better, capitalise just the first character of the
sentence (or alternatively work like the 'proper' function capitalise the
first letter of each word...)

I can do this easily in Word by pressing shift-F3, but there does not

appear
to be a similar function in Excel 2000.

Thanks for your help.


Patrick
Worcestershire, UK





Gord Dibben

Excel 2000: VB code for changing caseof text
 
Patrick

Chip Pearson has a CaseConvert add-in freely downloadable from his downloads
site.

http://www.cpearson.com/excel/download.htm

Scroll down to CaseCovert and download to your Office\Library folder.

Load it through ToolsAdd-ins


Gord Dibben Excel MVP

On Mon, 28 Nov 2005 22:38:33 GMT, "pgnl"
wrote:

I am hoping some kind person can help me with this Excel 2000 problem......

I need a short piece of VB code I can attach to a Button in the tool bar,
such that when I select a cell containing text it converts it from capitals
to small case or even better, capitalise just the first character of the
sentence (or alternatively work like the 'proper' function capitalise the
first letter of each word...)

I can do this easily in Word by pressing shift-F3, but there does not appear
to be a similar function in Excel 2000.

Thanks for your help.


Patrick
Worcestershire, UK



pgnl

Excel 2000: VB code for changing caseof text
 
Many thanks for your replies, I have now found some code and adapted it to
do what I want...

Patrick
Worcs, UK
"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Patrick

Chip Pearson has a CaseConvert add-in freely downloadable from his
downloads
site.

http://www.cpearson.com/excel/download.htm

Scroll down to CaseCovert and download to your Office\Library folder.

Load it through ToolsAdd-ins


Gord Dibben Excel MVP

On Mon, 28 Nov 2005 22:38:33 GMT, "pgnl"
wrote:

I am hoping some kind person can help me with this Excel 2000
problem......

I need a short piece of VB code I can attach to a Button in the tool bar,
such that when I select a cell containing text it converts it from
capitals
to small case or even better, capitalise just the first character of the
sentence (or alternatively work like the 'proper' function capitalise the
first letter of each word...)

I can do this easily in Word by pressing shift-F3, but there does not
appear
to be a similar function in Excel 2000.

Thanks for your help.


Patrick
Worcestershire, UK






All times are GMT +1. The time now is 05:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com