各位大侠:
我要用VB编写程序打开solidworks零部件,程序如下:
Option Explicit
Const filedir As String = "F:\solidworks\"
Dim WithEvents swapp As SldWorks.SldWorks
Dim WithEvents swmodel As SldWorks.ModelView
Private Sub cmdSldworks_Click()
Set swapp = CreateObject("SldWorks.Application")
If chkOpen.Value = True Then
Dim fileerror As Long
Dim filewarning As Long
swapp.OpenDoc6 filedir + TextBox1.Text, _
swDocPART, swOpenDocOptions_Silent, _
"", fileerror, filewarning
End If
End Sub
但是无法打开,不知道为什么。哪为给指点指点,在线急等!!!!