PDA

View Full Version : Solved: How To Determine Which Version of Excel Wrote a Workbook



Emily
08-11-2006, 10:01 PM
There is an article KB 225029 for the caption using C++

http://support.microsoft.com/default.aspx?scid=kb;en-us;225029

Is it possible to write a VBA for the caption using XLFileFormat?


Thanks in advance
Emily


ps Cross post in Mr Excel http://www.mrexcel.com/board2/viewtopic.php?p=1090013#1090013

stanl
08-12-2006, 03:25 AM
you might want to look at .CalculationVersion

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaxl11/html/xlproCalculationVersion1_HV03076626.asp

Stan

Emily
08-12-2006, 05:15 AM
Thanks stanl

MsgBox ThisWorkbook.CalculationVersion

It's ok but cannot check Workbook saved without any calculation, i.e. 0

Emily
08-12-2006, 06:35 AM
http://www.ureader.com/message/1216336.aspx



Sub xlFileVersion()
Dim Typ As String
Select Case ActiveWorkbook.FileFormat
Case -4143: Typ = "Excel 2000 et plus"
Case 16: Typ = "Excel 2.1"
Case 29: Typ = "Excel 3"
Case 33: Typ = "Sheet Excel 4"
Case 35: Typ = "Workbook Excel 4"
Case 39: Typ = "Excel 5"
Case 43: Typ = "Excel 97/2000& 5/95"
Case Else: Typ = "Unknown"
End Select
MsgBox "File format: " & Typ & " !", 64
End Sub

Emily
08-12-2006, 09:54 AM
Please read Joe's answer in the cross post (http://www.mrexcel.com/board2/viewtopic.php?p=1090013#1090013)