Throwing an error for the following code. The error code says, "Compile error: Expected: Then or Go to"
Here's the code is having issues with.
Private Sub Userform.Initialize()
If Worksheets("Sheet1").Range("P1").Value = "Y"
Then
CheckBox1.Value = True
Else
CheckBox1.Value = False
End If
End Sub
Any insight on how to correct this error? I feel like the code is solid.
Aucun commentaire:
Enregistrer un commentaire