In an application of VBA for Solidworks in which use EXCEL I obtain the following mistake:

Error of Run Time 429 Component ACTIVEX isn't in degrees to create object

In correspondence of command:

Set Excel = GetObject("H:\Prova\VBA SOLIDW\EXCEL\", "DATI.SPLINE.xls")

The complete lis it results Sub main() Dim SWapp As SldWorks.SldWorks Dim part As SldWorks.ModelDoc2 Dim Excel As Object Dim I As Integer Dim XPT As Double Dim YPT As Double Dim ZPT As Double Set SWapp = Application.SldWorks

Set part = SWapp.ActiveDoc Set Excel = GetObject("H:\Prova\VBA SOLIDW\EXCEL\","DATI.SPLINE.xls") part.Insert3DSketch I = 1 Do While Excel.CELLS(I, 1) "" XPT = Excel.CELLS(I, 1) YPT = Excel.CELLS(I, 2) ZPT = Excel.CELLS(I, 3) I = I + 1 Loop part.InsertSketch End Sub

I can anyone it know what do? Thank you.

Reply to
Loading thread data ...

I believe the first argument has to be the path with the file name. The second argument is the class. It appears that you have the file name as the second argument. I'd try including the file name with the first argument and not including any argument for the second.

Hope this helps,


Reply to

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.