Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default allcaps option in excel like word

If I write any text in a cell of ms excel that should be automatically upper
case like ms word. So how can i do ? suggest me.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default allcaps option in excel like word

Hi,

Press the capslock key?

Mike

"capital letter" wrote:

If I write any text in a cell of ms excel that should be automatically upper
case like ms word. So how can i do ? suggest me.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default allcaps option in excel like word

Mike's suggestion is the simplest, but if you must insure that a user
enters all CAPS, even if the CAPS LOCK key if off, you might add an
event handler to the worksheet. The routine below checks to see that the
data entered is actually text. It also turns off other events, so that a
formula can be entered. Events are turned on again, even if an error
occurs. Right click on the worksheet tab, then choose "View Code" at the
bottom of the menu. Paste the following code into the editor window:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngCell As Range

On Error GoTo ErrExit

Application.EnableEvents = False

For Each rngCell In Target
With rngCell
If WorksheetFunction.IsText(.Value) _
Then
.Value = UCase(.Value)
End If
End With
Next rngCell

ErrExit:
Application.EnableEvents = True
End Sub
--
Regards,
Bill Renaud


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
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. tln Links and Linking in Excel 0 April 22nd 07 04:28 PM
Lost option to email document as attachment direct from word & exc Kazoo Excel Discussion (Misc queries) 1 April 19th 06 04:31 PM
No option to password protect opening an excel / word file Andy Excel Discussion (Misc queries) 1 June 20th 05 03:54 PM
change the default word in the insert comment option in excel excel Setting up and Configuration of Excel 1 December 28th 04 02:50 PM
change the default word in the insert comment option in excel excel Setting up and Configuration of Excel 2 December 24th 04 12:51 PM


All times are GMT +1. The time now is 05:08 PM.

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

About Us

"It's about Microsoft Excel"