I'm running into a Range of Objects Worksheet Failed Error for some reason and I cant understand why.
All I did was add the following code to the set of ranges in the Target Range in the sheet code, and all of the sudden I'm having errors when entering text into the any of the cells within the ranges.
All I did was add the following code to the set of ranges in the Target Range in the sheet code, and all of the sudden I'm having errors when entering text into the any of the cells within the ranges.
VBA Code:
B319:C419,E319:F419,L319:M419,O319:P419,V319:W419,Y319:Z319,AF319:AG419,AI319:AJ419,B424:C524,E424:F524,L424:M524,O424:P524,V424:W524,Y424:Z524,AF424:AG524,AI424:AJ524,B529:C629,E529:F629,L529:M629,O529:P629,V529:W629,Y529:Z629,AF529:AG629,AI529:AJ629
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim xHour As String
Dim xMinute As String
Dim xWord As String
Dim rngMonitored As Range, Rng As Range
Set rngMonitored = Intersect(Target, Range("B4:C104,E4:F104,L4:M104,O4:P104,V4:W104,Y4:Z104,AF4:AG104,AI4:AJ104,B109:C209,E109:F1209,L109:M1209,O109:P209,V109:W209,Y109:Z209,AF109:AG209,AI109:AJ209,B214:C314,E214:F314,L214:M314,O214:P314,V214:W314,Y214:Z314,AF214:AG314,AI214:AJ314,B319:C419,E319:F419,L319:M419,O319:P419,V319:W419,Y319:Z319,AF319:AG419,AI319:AJ419,B424:C524,E424:F524,L424:M524,O424:P524,V424:W524,Y424:Z524,AF424:AG524,AI424:AJ524,B529:C629,E529:F629,L529:M629,O529:P629,V529:W629,Y529:Z629,AF529:AG629,AI529:AJ629"))
If rngMonitored Is Nothing Then Exit Sub
Application.EnableEvents = False
For Each Rng In rngMonitored
xWord = Format(Rng.Value, "0000")
xHour = Left(xWord, 2)
xMinute = Right(xWord, 2)
On Error Resume Next
Rng.Value = TimeValue(xHour & ":" & xMinute)
Next Rng
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
True, AllowFormattingColumns:=Fasle, AllowFormattingRows:=True, Password:="WellingtonFrac"
Application.EnableEvents = True
End Sub