Hi and welcome to the forum.

When using MSBFIRST you have to
Code:
Include "modedefs.bas"
Near the beginning of your code.

It is also a good idea when posting a problem to post the whole code. The problem may not be where you think...

If the above does not fix the problem tell us the model of the part you are connecting to.