左邊工程確認當前工作薄的名稱,然後 插入--模塊
複製以下代碼進去,最後按F5 運行
Sub sheetcount()
Dim num As Integer
num = ThisWorkbook.Sheets.Count
MsgBox "該工作薄含有 " & num & " 個工作表"
End Sub
參考鏈接:http://zhidao.baidu.com/question/117442892.html
Sub sheetcount()
Dim num As Integer
num = ThisWorkbook.Sheets.Count
MsgBox "該工作薄含有 " & num & " 個工作表"
End Sub