The code can be used but not transfered. The VB code will almost be the same ( the loops and other things that are standard ). The variables are different in each program where you code and also the location of the functions is different and how you need to run the functions.
For example, if you want to save a dxf in explorer of windows, you can use the part where it navigates to the right folder but you will have to rewrite the code for the saving itself. You can record a macro in solidworks and save a drawing as dxf and transfer merge that code with your existing code.