Current location - Education and Training Encyclopedia - Education and training - Tianjin VBA training class
Tianjin VBA training class
Subabstract ()

Dim WB as workbook, YN as boolean.

Dim Hzsht, Tjsht as worksheets.

Dim RowHz is as long as RowTj.

For each WB in the workbook

If WB. Name = "formtianjin. xlxls" and then

YN = correct

Quit for ...

If ... it will be over.

then

If YN = false, then the workbook. Open this workbook. Path and path. "\ from Tianjin. xls "

For i = 1 to 3

Set Hzsht = Workbooks ("table summary. xls”)。 Bedsheet (1)

Set Tjsht = Workbooks ("form Tianjin. xls”)。 Bedsheet (1)

RowHz = Hzsht。 UsedRange.Rows.Count

RowTj = Tjsht。 UsedRange.Rows.Count

Tjsht。 rows(" 2:" & amp; RowTj)。 Copy Hzsht. Range ("A" & ampRowHz+1)

then

End joint