what version of visual basic are you using?
In earlier versions of Visual Basic certain data types do not exist. It might be that the BAS file generation just won't work with these types. However it could also be that you are missing some data type definitions (such as the VISA ones). You might need to explicitly include some VISA header files into the project to define these data types properly.
Alternatively is there any other way you can use your code in VB? Creating an activeX controller for example?
Jon B
Applications Engineer
NI UK & Ireland