A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Changing lower case to upper case



 
 
Thread Tools Display Modes
  #1  
Old May 18th, 2004, 04:41 AM
Dazza
external usenet poster
 
Posts: n/a
Default Changing lower case to upper case

Hi, is there a way to enter lower case text into a cell,
say A1, and upon exiting that cell the text automatically
reverts to upper case?

If this is not possible, is there a way to change the cell
to upper case by inserting VB code into command button
macro?

Cheers,
D
  #2  
Old May 18th, 2004, 05:19 AM
Olly
external usenet poster
 
Posts: n/a
Default Changing lower case to upper case

In the module for the worksheet you want to run this code in, enter the
following code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value "" Then Target.Value = UCase(Target.Value)
End Sub

--

Olly


Dazza wrote:
*Hi, is there a way to enter lower case text into a cell,
say A1, and upon exiting that cell the text automatically
reverts to upper case?

If this is not possible, is there a way to change the cell
to upper case by inserting VB code into command button
macro?

Cheers,
D *



---
Message posted from http://www.ExcelForum.com/

  #3  
Old May 18th, 2004, 05:27 AM
Norman Harker
external usenet poster
 
Posts: n/a
Default Changing lower case to upper case

Hi Dazza!

See Dave McRitchie's post at:

http://tinyurl.com/ywdlq

It provides details of the required code and links that will assist
you in inserting it into your workbook.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia



  #4  
Old May 18th, 2004, 08:31 AM
external usenet poster
 
Posts: n/a
Default Changing lower case to upper case

Hi thanks for the help. I have placed this code in the
worksheet midule as advised however I keep getting an
error. How do I limit the target to A14 to A54?
-----Original Message-----
In the module for the worksheet you want to run this code

in, enter the
following code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value "" Then Target.Value = UCase

(Target.Value)
End Sub

--

Olly


Dazza wrote:
*Hi, is there a way to enter lower case text into a

cell,
say A1, and upon exiting that cell the text

automatically
reverts to upper case?

If this is not possible, is there a way to change the

cell
to upper case by inserting VB code into command button
macro?

Cheers,
D *



---
Message posted from http://www.ExcelForum.com/

.

  #5  
Old May 18th, 2004, 11:47 AM
Norman Harker
external usenet poster
 
Posts: n/a
Default Changing lower case to upper case

Hi!

Use the following modification:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("A14:A54")) Is Nothing Then Exit Sub
If Target.Value "" Then Target.Value = UCase(Target.Value)
End Sub

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.