Vb to make software run on some computer display error
Time:09-17
Vb software to run on some computer can't work normally, the program is in win764 system, execl access is 2010 references is 14.0, involves some function calls execl, sometimes shows 48 load the DLL errors, sometimes shows the class does not support Automation or does not support expected interface, program is encapsulated with factory7.0, xp + 2003 experimental computer (PC) can use Windows 7 32 + office2010 (desktop) sometimes can sometimes (notebook) appears the mistake I describe, everyone to analysis the problem in where? Is the system reason or execl version? Is there a good way to improve a good way to support for execl version? Below is a part of the code Private Sub daochu_Click () Dim the I, J, c As Long Dim conn As ADODB. Connection Dim RST As ADODB. You Call xinjian Set the conn=New ADODB. Connection The Set RST=New ADODB. You Conn. The ConnectionString="Provider=Microsoft. Jet. The oledb. 4.0; Data source="& amp; App. The Path & amp; "\ 2018. MDB;" Conn. Open RST. CursorLocation=adUseClient RST. Open the "select * from table" new, conn, adOpenDynamic adLockOptimistic, Dim Dim MyApp As Object 'MyApp As Excel. The Application Dim MyBook As Object 'Dim MyBook As Excel. The Workbook Dim MySheet As Object 'Dim MySheet As Excel. The Worksheet The Set MyApp=CreateObject (" Excel. Application ") MyApp. Visible=False The Set MyBook=MyApp. Workbooks. The Add () The Set MySheet=MyBook. Worksheets (1) For c=0 To RST. Fields. The Count - 1 MySheet. Cells (c + 1, 1)=RST. Fields (c). The Name Next J=2 EOF Do Until RST.For I=1 To RST. Fields. The Count MySheet. Cells (J, I)=RST. Fields (I - 1) Next RST. MoveNext J=J + 1 Loop Xinjian MyBook. SaveAs "d: \ \ group registration results 2018 BMJG. XLS" MyApp. Quit The Set MyApp=Nothing RST. Close The Set of RST=Nothing Set the conn=Nothing FileCopy App. Path & amp; "\ 2018. MDB", "d: \ \ group registration results 2018. MDB" MsgBox "export success! File in d: \ group registration knot \ 2018 BMJG XLS ", vbOKOnly, "tip" End Sub