Dim EX As Excel.Application
Dim rs As Recordset
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Dim Temptable As Excel.Worksheet
Dim str As String
Dim i As Integer
Dim Returnvalue
Dim temp As Integer
Dim zpname As String
zpname = Date
For Each Temptable In Worksheets
If Temptable.Name = zpname Then
temp = MsgBox(zpname & "已经存在,是否重新生成", vbYesNo)
If temp = vbYes Then
End If
If temp = vbNo Then
MsgBox "不能创建同样名称的表,关闭工作簿"
GoTo tuichu2:
End If
End If
Next
ws.Copy before:=Sheets(Sheets.Count)
Sheets(Sheets.Count - 1).Name = CStr(Date)