View Full Version : Solved: Selection Caps Locks
av8tordude
01-28-2013, 05:35 AM
I have this code that capitalizes the cell. Problem I'm facing it continuously loops because there is a change. Is there another ways of doing thins via VBA?
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Activate
Selection.Value = UCase(ActiveCell.Value)
End Sub
Bob Phillips
01-28-2013, 06:21 AM
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
On Error GoTo ws_exit
Application.EnableEvents = False
For Each cell In Target
cell.Value = UCase(cell.Value)
Next cell
ws_exit:
Application.EnableEvents = True
End Sub
av8tordude
01-28-2013, 06:25 AM
Thank XLD:friends:
Private Sub Worksheet_Change(ByVal Target As Range)
if target<>Ucase(target) and vartype(target)=8 then target= UCase(Target)
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.