And what code are you using in the other form?

In case you aren't aware, you must use the name of the form that the variables are declared in.
but even when I remove the Withevents I still get an error.
Based on that, it sounds to me like you don't understand what WithEvents is - and are therefore almost certainly not using it. If that is the case, you should remove it.