导读 用宏比较容易实现。代码如下: Private Sub Worksheet_Activate() Dim sh As Worksheet Dim a As Intege...
用宏比较容易实现。
代码如下: Private Sub Worksheet_Activate() Dim sh As Worksheet Dim a As Integer Dim R As Integer R = Sheet1.[A65536].End(xlUp).Row a = 2 If Sheet1.Cells(2, 1) <> "" Then Sheet1.Range("A2:A" & R).ClearContents End If For Each sh In Worksheets If sh.CodeName <> "Sheet1" Then Sheet1.Cells(a, 1).Value = ***.Name a = a + 1 End If Next End Sub。