Home > Software engineering >  Consult with vb6 WPS form operation
Consult with vb6 WPS form operation

Time:02-20

Through vb WPS derived form, the first run ok, run again to "Sheets (" sheet1"). The Activate " 462 mistakes, the remote server does not exist or cannot be used, stop debugging, close all ET process can run once again, what reason is this?

Sub DaochuWpsAll () '
'reference WPS Spreadsheets 2.0 Object Library
'the WPS form 9.1.0.5016
Dim xlBook As ET. The workbook
Dim xlSheet As ET. The Worksheet
Dim etApp As ET. Application

The Set etApp=CreateObject (" ET. Application ")
The Set xlBook=etApp. Workbooks (). The Add
The Set xlSheet=xlBook. Worksheets (1)

Sheets (" sheet1 "). Activate
ActiveSheet. Name="summary"
The Set xlSheet=xlBook. Worksheets (" sheet2 ")
Sheets (" sheet2 "). Activate
ActiveSheet. Name="detail 1
"The Set xlSheet=xlBook. Worksheets (" sheet3 ")
Sheets (" sheet3 "). Activate
ActiveSheet. Name="detail 2
"
Sheets (" summary "). Activate
EtApp. DisplayAlerts=False
XlBook. SaveAs App. Path & amp; "\ TAB. XLS"
The Set xlSheet=Nothing
XlBook. Close
The Set xlBook=Nothing
EtApp. Application. Quit
EtApp. Quit
The Set etApp=Nothing
MsgBox App. Path & amp; "VbInformation, \ TAB. XLS", "export completed"
The Exit Sub
End Sub

CodePudding user response:

See I send the EXCEL foundation that post

CodePudding user response:

So
  • Related