The code you posted is incorrect, the correct one is:
Sub ImageView1_Clik
ImagVview1.visible = False
ImageView2.visible = True
End Sub
You have to indicate what row raises the error. Within the Sub Intercepting the Click Event?
If so, then it clicked ImageView1 one when ImageView2 has not yet been initialized or added to a view
Attach the code where you initiate the views.