PC Review


Reply
Thread Tools Rate Thread

caps in cells

 
 
duckie
Guest
Posts: n/a
 
      6th May 2008
how do i always have upper case letters in some cells and not others
when I click on that cell
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      6th May 2008
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 <(E-Mail Removed)> wrote:

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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transforming many cells of all caps into first letter capitals onl Jbm Microsoft Excel Misc 5 24th Jul 2009 07:57 PM
Word: Caps Lock & Font/All Caps off, but types caps. Why? =?Utf-8?B?TmllbA==?= Microsoft Word Document Management 3 13th Sep 2007 08:00 PM
Help?! Format Cells for ALL CAPS =?Utf-8?B?RnJ1c3RyYXRlZA==?= Microsoft Excel Misc 1 27th Aug 2007 05:42 PM
Forcing All Caps in input cells Slave2Six Microsoft Excel Misc 8 31st Jul 2006 09:38 PM
Can i setup cells to only accept caps John McGing Microsoft Excel Programming 2 15th Jan 2004 02:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:49 PM.