mercredi 4 mars 2015

If statement Compile error

I'll try to make a macro with an If statement in it. But I get the error message



Sub or Function not defined



The following code is used.



Sub whatif()

If Range("memory") = "data" Then
Worksheet("Side").Range("B1") = "yes"
End If

End Sub


I figured out the problem is line



Worksheet("Side").Range("B1") = "yes"


When commenting out the other lines it still gives an error. What does need adjustment?


Aucun commentaire:

Enregistrer un commentaire