大神们,讲解一下这个代码为什么不执行!
可以执行的代码Private Sub MSHFlexGrid1_DblClick()
ipath = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.MouseRow, 8)
Set swApp = CreateObject("SldWorks.Application")
Set swModelDoc = swApp.ActiveDoc
Set Part = swApp.OpenDoc6("C:\Users\Administrator\Desktop\DB123.001 圆盘111.SLDPRT", 1, 0, "", longstatus, longwarnings)
End Sub
不执行的代码,用msgbox 显示 ipath=C:\Users\Administrator\Desktop\DB123.001 圆盘111.SLDPRT
Private Sub MSHFlexGrid1_DblClick()
ipath = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.MouseRow, 8)
Set swApp = CreateObject("SldWorks.Application")
Set swModelDoc = swApp.ActiveDoc
Set Part = swApp.OpenDoc6(ipath, 1, 0, "", longstatus, longwarnings)
End Sub