Forum Discussion
ADGToreUp
Aug 16, 2022Brass Contributor
Compile Error: End if without Block if. If Loop Function.
Hello Everybody, I have a loop function while using the "Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)" function. I have a spread sheet that loops through wing dings, wit...
- Aug 16, 2022
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Intersect(Target, Range("F11:L43")) Is Nothing Then Select Case Target.Value Case Is = "/" Target.Value = "$" Case Is = "O" Target.Value = "/" Case Is = "P" Target.Value = "O" Case Is = "$" Target.Value = "P" Case Is = Empty Target.Value = "/" End Select ActiveSheet.Range("A22").Select End If End SubMaybe with these lines of code.
Rsartori76
Aug 16, 2022Brass Contributor
The last "End If" should be an "End Sub". Change that and it should work.
ADGToreUp
Aug 16, 2022Brass Contributor
The issue with that, is i have other ranges that i am doing other loops on for the double click, with different value in those ranges, so i cannot end the sub right at that point.