Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default caps in cells

how do i always have upper case letters in some cells and not others
when I click on that cell
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default caps in cells

Clicking in a cell will not change the case of the string in a cell.

You could use some double-click event code if that's what you're thinking of.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Target.Column 3 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
Cancel = True
ErrHandler:
Application.EnableEvents = True
End Sub


Or you could have the Upper case added as you type in the cell.
No doubleclick involved.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 3 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP

On Tue, 6 May 2008 13:33:57 -0700 (PDT), duckie wrote:

how do i always have upper case letters in some cells and not others
when I click on that cell


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
In excel can you change words from all caps to initial caps? O2bardy Excel Discussion (Misc queries) 7 May 7th 10 03:33 PM
Help?! Format Cells for ALL CAPS Frustrated Excel Discussion (Misc queries) 1 August 27th 07 05:42 PM
How can I convert all Caps to first letter caps in Excel? Fenljp26 Excel Worksheet Functions 5 June 30th 05 11:35 AM
excel sheet all caps and needs to be only the first letter caps.. kroberts Excel Discussion (Misc queries) 1 March 7th 05 02:44 PM
Can i setup cells to only accept caps John McGing Excel Programming 2 January 15th 04 02:33 PM


All times are GMT +1. The time now is 11:17 PM.

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"