Run time error 91 occurs when you are not declaring the variables. Ensure that you are declaring like this before your execution of code.
Dim swapp as sldworks.sldworks
Dim swpart as sldworks.modeldoc2
After this declaration you continue with your code
Set SwApp = CreateObject("SldWorks.Application")
Set swpart= SwApp.OpenDoc("C:\Program Files\SolidWorks Corp\SolidWorks\Simulation\Examples\Tutor1.SLDPRT ", swDocPART, 1, "", longstatus, longwarnings)
Set swpart= SwApp.ActiveDoc
i checked it and all the variables are declared.
the first problem disappear and it's dont give me the warning : Failed to open C:\Program Files\SolidWorks Corp\SolidWorks\Simulation\Examples\Tutor1.SLDPRT
but the second problem in the code didn't fixed.
i think there are tow problems:
1. the Msg that : " study not created" - it's seems like the study=0
2. run time error - whan i press debug it's show me the next line in bolt : Set SolidMgr = Study.SolidManager
i checked and SolidMgr is declared.
do the code from the web give you the same problem whan you try to run it?