
Private Sub Workbook_Open()
Dim shname As String, sh As Worksheet
shname = Sheets(Sheets.Count).Name
If shname <Date Then
Set sh = Sheets.Add(after:=Sheets(Sheets.Count))
sh.Name = Date
End If
End Sub
Private Sub Command1_Click()Dim xlApp As New Excel.Application
Dim xlBook As Excel.Workbook
Set xlBook = xlApp.Workbooks.Add '新添加Excel
Sheets("Sheet1").Name = "test" '重新命名
xlApp.Visible = True
End Sub
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)