ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to change cell value to uppercase automaticaly when entered (https://www.excelbanter.com/excel-discussion-misc-queries/114225-how-change-cell-value-uppercase-automaticaly-when-entered.html)

indy

how to change cell value to uppercase automaticaly when entered
 


Paul B

how to change cell value to uppercase automaticaly when entered
 
indy, something like this, put in worksheet code,

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Error_handler
If Not Intersect(Range("A1"), Target) Is Nothing Then
With Target
If Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
End If
End With
End If

Error_handler:
Resume Next
Application.EnableEvents = True
End Sub



--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"indy" wrote in message
...





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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com