Home > Software engineering >  Why use DIir document traversal time display an error
Why use DIir document traversal time display an error

Time:11-19

Transformer (Sub)


Dim STR As String
Dim x As Integer

Dirs=Dir (" E: \?????????????? \?????? \ \ 1 00???????? "& amp; "\ *. XLSX")

The Do While dirs & lt;> "
"The Set XLSX=Workbooks. Open (" E: \?????????????? \?????? \ \ 1 00???????? "& amp; "" & amp; Dirs)

Dim c, d, e, f As Integer
C=7 '?????????
D=8 '????????
E=9 '?? С???
F=10 '?? С??????
G=1 '???????????????


R=2
M=2

Sheets. The Add

Sheets (2) Cells (1, c)=XLSX) Sheets (1) Cells (1, 2)

Sheets (2) Cells (1 d)="time"
The Do While XLSX. Sheets (1) Cells (r, 1) & lt;> "
"Sheets (2) Cells (m, c)=XLSX. Sheets (1) Cells (r, 2)
Sheets (2) Cells (m, d)=Year (XLSX) Sheets (1) Cells (r, 1))


The Do While Year (XLSX Sheets (1) Cells (r, 1))=Sheets (2) Cells (m, d) And XLSX. Sheets (1) Cells (r, 1) & lt;> "
"If Sheets (2) Cells (m, c) & gt;=XLSX. Sheets (1) Cells (r, 2) Then
Sheets (2) Cells (m, c)=Cells (m, c)
Sheets (2) Cells (m, d)=Cells (m, d)
The Else
Sheets (2) Cells (m, c)=XLSX. Sheets (1) Cells (r, 2)
Sheets (2) Cells (m, d)=Year (XLSX) Sheets (1) Cells (r, 1))
End the If
R=r + 1
Sheets (2) Cells (m, 11)=Cells (m, 7) - Cells (m, 9) '11??????
Loop
M=m + 1
Loop
M=2
R=2
The Do While XLSX. Sheets (1) Cells (r, 1) & lt;> "
"Sheets (2) Cells (m, e)=XLSX) Sheets (1) Cells (r, 2)
Sheets (2) Cells (m, f)=Year (XLSX) Sheets (1) Cells (r, 1))
Do While Year (XLSX Sheets (1) Cells (r, 1))=Cells (m, f) And XLSX) Sheets (1) Cells (r, 1) & lt;> "" '???????????????
If Sheets (2) Cells (m, e) & lt;=XLSX. Sheets (1) Cells (r, 2) Then
Sheets (2) Cells (m, e)=Cells (m, e)
Sheets (2) Cells (m, f)=Cells (m, f)
The Else
Sheets (2) Cells (m, e)=XLSX) Sheets (1) Cells (r, 2)
Sheets (2) Cells (m, f)=Year (XLSX) Sheets (1) Cells (r, 1))
End the If
R=r + 1
Loop
M=m + 1
Loop

XLSX. Close True


Dirs=Dir
Loop



End Sub


Display error of
Procedure call or invalid parameter error (5)
2017/06/08

Unable to complete calls a part of, the reason of the error and solutions are as follows:
Parameters may be beyond the range of allowable values, for example, the value of the sine function can only accept certain scope, can accept parameters are less than 2147483648, and 2147483648 will generate this error,
The scope of the inspection parameters allows
If you try to call on the current platform invalid process, also can appear this error, for example, some process is only effective for Microsoft Windows or the Macintosh,
Check the platform specific process information,
For additional information, select the defective item and press F1 (in Windows) or a HELP (to) on the Macintosh,
Support and feedback

About Office VBA or questions about this document or feedback? Please refer to the Office VBA support and feedback, obtain guidelines about how to receive support and provide feedback,
  •  Tags:  
  • VBA
  • Related