Option Explicit
Private Sub Workbook_Open()
If Application.Version = 7 Then
MsgBox "You have Office '95 installed"
ElseIf Application.Version = 8 Then
MsgBox "You have Office '97 installed"
ElseIf Application.Version = 9 Then
MsgBox "You have Office 2000 installed"
ElseIf Application.Version = 10 Then
MsgBox "You have Office 2002 installed"
ElseIf Application.Version = 11 Then
MsgBox "You have Office 2003 installed"
ElseIf Application.Version > 11 Then
MsgBox "You have Office version " & Application.Version & " installed"
End If
If Application.Version = 7 Then
MsgBox "This program was designed to run on Office 2000 (or higher)" & vbLf & _
"You have Office '95 installed, so it's quite possible the program" & vbLf & _
"may not function properly on your machine...", vbInformation, "Information..."
End If
If Application.Version = 8 Then
MsgBox "This program was designed to run on Office 2000 (or higher)" & vbLf & _
"You have Office '97 installed, so it's quite possible the program" & vbLf & _
"may not function properly on your machine...", vbInformation, "Information..."
End If
If Application.Version >= 8 Then
MsgBox "This program was designed to run on Office 2000 (or higher)" & vbLf & _
"so you should have no problems when running it... :o)", _
vbInformation, "Information..."
End If
End Sub
|