Public Sub Aa()
If testing Then Exit Sub
On Error GoTo ErrorHandler
Dim cell As Object
Dim prefix As String
For Each cell In Selection.Cells
prefix = cell.PrefixCharacter
If cell.EntireColumn.Hidden = False And cell.EntireRow.Hidden = False Then
If cell = UCase(cell) Then
cell = prefix & LCase(cell)
Exit Sub
End If
If cell = LCase(cell) Then
cell = prefix & UCase(cell)
Exit Sub
End If
End If
Next
ErrorHandler:
If Err.Number <> 0 Then
MyMsgBox Err.Number & " " & Err.Description, 30
End If
End Sub
网友评论