Sub 查詢Excel版本()
On Error GoTo error1
Dim myVersion As String
Select Case Val(Application.Version)
Case 5
myVersion = "5.0"
Case 7
myVersion = "95"
Case 8
myVersion = "97"
Case 9
myVersion = "2000"
Case 10
myVersion = "2002"
Case 11
myVersion = "2003"
Case 12
myVersion = "2007"
Case 14
myVersion = "2010"
Case Else
myVersion = "版本不明"
End Select
MsgBox "你的Excel是" & myVersion & "版", vbInformation
error1: End Sub作者: enoch 時間: 2012-5-30 10:54
Sub 巨集1()
If Val(Application.Version) >= 12 Then '2007 SAVE
ActiveWorkbook.SaveAs "C:\Users\user\Desktop\活頁簿1.xls", FileFormat:=xlExcel8
Else
ActiveWorkbook.SaveAs "C:\Users\user\Desktop\活頁簿1.xls"
End If
End Sub