Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
TAJ Simmons
 
Posts: n/a
Default Convert to Lower case (not with a function)

Excel XP/2002

Is there a quick button I can add to a custom toolbar to convert a selected cell to lower case?

I've searched the customize toolbar menu items but cannot find it. Sure excel has one? (even powerpoint has one!)

Unfortunately a 'function' to convert the data is no use to me this time.

Cheers
TAJ Simmons
microsoft powerpoint mvp

awesome - powerpoint backgrounds,
free powerpoint templates, tutorials, hints and tips etc
http://www.powerpointbackgrounds.com


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

TAJ,

You will need to create your own.

Below is a sub that you can add to a standard code module in your
Personal.xls and it will convert the selected cells. It has 2 options,
normal click for lower case, shift-click for upper case

You will also need to add the button to a toolbar, this code can do that

Dim oCtl As CommandBarControl

With
Application.CommandBars("Formatting").Controls.Add (Type:=msoControlButton)
.Caption = "Change Case"
.FaceId = 254
.OnAction = "ChangeCase"
End With

This adds a button with a small A (not lower case) and a big A, which seems
appropriate enough.

Here is the case change routine.

Option Explicit

Declare Function GetKeyState Lib "user32" (ByVal fnKey As Long) As Integer

Const vkShift As Integer = &H10

Sub ChangeCase()
Dim cell As Range
For Each cell In Selection
If GetKeyState(vkShift) < 0 Then
cell.Value = UCase(cell.Value)
Else
cell.Value = LCase(cell.Value)
End If
Next cell
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"TAJ Simmons" wrote in message
...
Excel XP/2002

Is there a quick button I can add to a custom toolbar to convert a

selected cell to lower case?

I've searched the customize toolbar menu items but cannot find it. Sure

excel has one? (even powerpoint has one!)

Unfortunately a 'function' to convert the data is no use to me this time.

Cheers
TAJ Simmons
microsoft powerpoint mvp

awesome - powerpoint backgrounds,
free powerpoint templates, tutorials, hints and tips etc
http://www.powerpointbackgrounds.com




  #3   Report Post  
TAJ Simmons
 
Posts: n/a
Default

Thanks Bob


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Amount or Numbers in Words ron New Users to Excel 6 December 24th 04 07:32 PM
Is there a formula to spell out a number in excel? Sha-nay-nay Excel Worksheet Functions 2 December 18th 04 09:25 PM
Convert Numeric into Text Monty Excel Worksheet Functions 0 December 18th 04 09:25 PM
Spellnumber Norman Jones Excel Worksheet Functions 6 December 13th 04 07:21 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"