I am using this in an excel 2010 document, but I get a debug error. It is because I am also using the following code. I just cannot figure out how to fix the range on the above code.
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("H6:H69,M6:M69,R6:R69,W6:W69,AB6:AB69,AG6:AG69,AL6:AL69,AQ6:AQ69")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value)
End If
Application.EnableEvents = True
I am using this in a schedule for work, and these target cells are all capital. I need the next 3 cells after these above listed cells to be Proper case for Employee names.
Example:
A6 B6 C6
TEST COMPANY Employee Name1 Employee Name2
When I run the above vba code in the excel document, it gives a debug error and points to the target range of the next code for the COMPANY. After I close the debug, the code for the Employee works.
Any clue on how to fix?