ActiveX

Discussion in 'SolidWorks' started by Locomotiva, Jul 18, 2005.

  1. Locomotiva

    Locomotiva Guest

    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.
     
    Locomotiva, Jul 18, 2005
    #1
  2. Locomotiva

    Tony Guest

    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,

    Tony
     
    Tony, Jul 20, 2005
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.