Sub AddSheet()
Dim wkbSource As Workbook
Dim ws As Worksheet
Application.Screenupdating = False
Set wkbSource = Workbooks.Open("C:\nani\Excel-Vba\test.xlsx")
Set ws = wkbSource.Sheets
ws.Add(Before:=Sheets(1)).Name = "FirstSheet"
End Sub
答案 0 :(得分:2)
很多问题
Sub AddSheet()
Dim wkbSource As Workbook
Dim ws As Worksheet
Set wkbSource = Workbooks.Open("C:\nani\Excel-Vba\test.xlsx")
Set ws = wkbSource.Worksheets.Add(Before:= wkbSource.Sheets(1))
Ws.Name = "FirstSheet"
End Sub