Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Was workbook opened with Excel 2007?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default Was workbook opened with Excel 2007?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Was workbook opened with Excel 2007?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 files not showing on screen when opened in Excel 2007 [email protected] Setting up and Configuration of Excel 1 January 8th 09 05:45 PM
Opening a workbook if not opened, going to it if already opened neotokyo[_3_] Excel Programming 0 September 24th 04 08:56 PM
Opening a workbook if not opened, going to it if already opened neotokyo[_2_] Excel Programming 1 September 24th 04 07:17 PM
Opening a workbook if not opened, going to it if already opened neotokyo Excel Programming 1 September 24th 04 06:33 PM
How to see if the opened workbook is opened by another user ? balexis Excel Programming 1 August 18th 04 04:11 PM


All times are GMT +1. The time now is 02:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"