View Single Post
 
Old 09-24-2021, 07:41 PM
Purfleet Purfleet is offline Windows 10 Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

to expand on the If statement a bit (i was also caught with this at the beginning)

If you have and if statment like
Code:
If Target.Count > 1 Then Exit Sub
Where you have the comparison and end it on the same line you dont use end if

but if you typed
Code:
If Target.Count > 1 Then
    Exit Sub
End If
you would need the end if

You also need to be carefull about nesting the if/end ifs correctly as it can cause problems
Reply With Quote