第二题
Sub h2()
Dim wb As Workbook
Dim x As Integer
Dim lastRow As Integer
Dim startRow As Integer
Set wb = Workbooks.Open("E:\vba\VBA80_第12集.特殊单元格定位\A.xls")
For x = 1 To wb.Worksheets.Count
lastRow = wb.Sheets(x).Range("a65535").End(xlUp).Row
startRow = Range("a65535").End(xlUp).Offset(1, 0).Row
If Range("a1") = "" Then
wb.Sheets(x).Range("a1:d" & lastRow).Copy Destination:=Cells(startRow - 1, 1)
Else
wb.Sheets(x).Range("a2:d" & lastRow).Copy Destination:=Cells(startRow, 1)
End If