Private Sub Workbook_BeforeClose (Cancel As Boolean)
Application. ScreenUpdating=False
On the Error Resume Next
Application. The SendKeys "{ENTER}" ENTER
End Sub
Sub abnormal expiration ()
For n=2 To 25
I=n - 1
Myfile.=ThisWorkbook Path & amp; ""
Application. The Workbooks. Open Filename:=myfile & amp; Sheets (hereinafter referred to as "company"). The Cells (3, 3) & amp; "\ companies report " & amp; Cells (n, 1) & amp; "\ *. XLSX
"Sheets (" table 1-4 expiration of abnormal payment "). Select
Range (" A1: J15). Select
Selection. Copy
ActiveWindow. Close False
Windows (" VBA tables. XLSM "). The Activate
Sheets. The Add After:=ActiveSheet
ActiveSheet. Paste
Selection. The PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Sheets (I). Select
Sheets (I). The Name=Sheets (hereinafter referred to as "company"). The Range (B & amp; N)
Next
End Sub
CodePudding user response:
Qq656972278 can remote debugging, the limit of night, online, estimated at about 10 a.m.CodePudding user response:
Began keeping records in Excel macro, manual, complete the required function end record macros, press Alt + F11 key, check just record macro corresponding VBA code,