Home > Software engineering >  Why vba for next outside the range given
Why vba for next outside the range given

Time:02-19

I this is a copy paste code, copy from 1 to 12 months, a month a list, all together is copied to the
Why code to num assignment 1 to 13, will run to 14?


Private Sub CommandButton1_Click ()
Dim num %, j %
Dim TE As Date
TE=InputBox (" Input YYYY/mm/dd ")
On the Error Resume Next
J=1
For num=1 To 13
Sheets (num). The Range (" A1 "). The AutoFilter
Sheets (num). The Range (" A1 "). The AutoFilter
Sheets (num.) Range (a2: "l" & amp; Sheets (num). The Range (" a1000 "). The End (xlUp). The Row). Copy
Sheet14. Cells (j + 1, 1). The PasteSpecial xlPasteValues
J=Sheet14 UsedRange. Rows. Count
Next

CodePudding user response:

This is not your own wrote a 14 in the yao


  •  Tags:  
  • VBA
  • Related