Is there a way using the workbook open event to tell which version of excel is opening the workbook then display it in a message box?
Is there a way using the workbook open event to tell which version of excel is opening the workbook then display it in a message box?
Peace of mind is found in some of the strangest places.
[vba]
Private Sub Workbook_Open()
Select Case Val(Application.Version)
Case 12: MsgBox "Excel 2007"
Case 11: MsgBox "Excel 2003"
Case 10: MsgBox "Excel 2002/XP"
Case 9: MsgBox "Excel 2000"
End Select
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Thanks bob. Spot on as usual.
Peace of mind is found in some of the strangest places.
There should be a format for version shouldn't there? Something like
[vba]
Msgbox Format(Val(Application.Version),xlVersion)
[/vba]
<BG>
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
What I am after is that this workbook could potentially be opened on any machine using excel. Depending on what version opens it (in this case 2003 or 2007) the user will be prompted to use a different version of instructions to install missing addins. This is a project I am doing for a university which is migrating from 2003 to 2007. It can be done on campus or taken home to do. So the message box would say:
"You are running Excel 2003, please use the instructions that pertain to that version to install the addins." Likewise for 2007.
Peace of mind is found in some of the strangest places.