I'm relatively new to vba macros within solidworks but have a fair amount of experience with them in excel and autocad as well as some .net experience.
I wrote up a vba macro inside sw (2007) to open solidworks parts from a windows directory and everything works great... on all but 1 machine. Problems on the 1 machine (that i've managed to find so far...cant run it all the way through as it keeps crashing) are:
- userform opens behind the solidworks window. causes solidworks to behave like its frozen until you minimize all, then restore sw which brings up my userform. I've tried making a new program on this machine which simply opens a blank userform (main sub- userform1.show... thats it!) and it still opens behind the solidworks window. What in the world is going on here?
- the GetPreviewBitmap method throws an automation error, catastrophic failure. I've stepped through and everything appears to be working right until the error.
Again, this program has worked flawlessly on a number of other machines.
Can anyone provide any suggestions?
Thanks
SolidworksApi macros