Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook with formulas that only work in Excel '07 (using the
iferror function). When the workbook is opened, I want to check if the user opened it with an earlier version of Excel. If they did, I want to tell them to open it with Excel '07 and then automatically close the workbook. I think I can handle writing all of the code except the part where I check what version of excel they are using. The only member of the Application object that I found which might be useful was Application.Version, but I don't know if this can be trusted (returns 12.0 for me). Has anyone else written code to perform the above validation? I would rather not change all of my functions to include IF stmts instead of IFERROR... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
should be fine.
Option Explicit Private Sub Workbook_Open() If Application.Version < 12 Then MsgBox "whatever you want to say" ActiveWorkbook.Close savechanges:=False End If End Sub -- Gary "Mike" wrote in message ... I have a workbook with formulas that only work in Excel '07 (using the iferror function). When the workbook is opened, I want to check if the user opened it with an earlier version of Excel. If they did, I want to tell them to open it with Excel '07 and then automatically close the workbook. I think I can handle writing all of the code except the part where I check what version of excel they are using. The only member of the Application object that I found which might be useful was Application.Version, but I don't know if this can be trusted (returns 12.0 for me). Has anyone else written code to perform the above validation? I would rather not change all of my functions to include IF stmts instead of IFERROR... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Didn't think there was any way it was that simple. Thanks!!!
"Gary Keramidas" wrote: should be fine. Option Explicit Private Sub Workbook_Open() If Application.Version < 12 Then MsgBox "whatever you want to say" ActiveWorkbook.Close savechanges:=False End If End Sub -- Gary "Mike" wrote in message ... I have a workbook with formulas that only work in Excel '07 (using the iferror function). When the workbook is opened, I want to check if the user opened it with an earlier version of Excel. If they did, I want to tell them to open it with Excel '07 and then automatically close the workbook. I think I can handle writing all of the code except the part where I check what version of excel they are using. The only member of the Application object that I found which might be useful was Application.Version, but I don't know if this can be trusted (returns 12.0 for me). Has anyone else written code to perform the above validation? I would rather not change all of my functions to include IF stmts instead of IFERROR... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 files not showing on screen when opened in Excel 2007 | Setting up and Configuration of Excel | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
How to see if the opened workbook is opened by another user ? | Excel Programming |