+ Reply to Thread
Results 1 to 5 of 5

What version Excel file was created in.

  1. #1
    ExcelMonkey
    Guest

    What version Excel file was created in.

    Can anyone tell me how to find out what version of Excel and file was created
    in? I have a routine which inserts sheets into workbooks. However it fails
    on files that were used extensively in Excel 97. I want to put an error
    handler in that checks to see if the file in question was created/used in
    Excel 97.

    I am assuming that checking the version that it is currently in will not be
    efficient as a file created in Excel 97 will likely have been saved as more
    current versions. I know Tom Ogilvy has stated in an ealier post that you
    can look at the sheet names in the project window of the VBE to get a clue.

    For example, Sheet 16 in this file is named "Sheet16111111". Tom had stated
    that this was a clue. And if fact it is, you cannot insert sheets in this
    workbook via VBA.

    Thanks

  2. #2
    Damon Longworth
    Guest

    Re: What version Excel file was created in.

    Try:

    Application.Version

    --
    Damon Longworth

    Don't miss out on the 2005 Excel User Conference
    Sept 16th and 17th
    Stockyards Hotel - Ft. Worth, Texas
    www.ExcelUserConference.com


    "ExcelMonkey" <[email protected]> wrote in message
    news:[email protected]...
    > Can anyone tell me how to find out what version of Excel and file was
    > created
    > in? I have a routine which inserts sheets into workbooks. However it
    > fails
    > on files that were used extensively in Excel 97. I want to put an error
    > handler in that checks to see if the file in question was created/used in
    > Excel 97.
    >
    > I am assuming that checking the version that it is currently in will not
    > be
    > efficient as a file created in Excel 97 will likely have been saved as
    > more
    > current versions. I know Tom Ogilvy has stated in an ealier post that you
    > can look at the sheet names in the project window of the VBE to get a
    > clue.
    >
    > For example, Sheet 16 in this file is named "Sheet16111111". Tom had
    > stated
    > that this was a clue. And if fact it is, you cannot insert sheets in this
    > workbook via VBA.
    >
    > Thanks




  3. #3
    Bob Phillips
    Guest

    Re: What version Excel file was created in.

    This gives you the current Excel version, not what the workbook was created
    in.

    Tom Ogilvy gave a post some while back which returns the fileformat. Okay if
    it hasn't been updated, but other than that I think you are on a lost
    cause - http://tinyurl.com/b6okv

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Damon Longworth" <[email protected]> wrote in message
    news:[email protected]...
    > Try:
    >
    > Application.Version
    >
    > --
    > Damon Longworth
    >
    > Don't miss out on the 2005 Excel User Conference
    > Sept 16th and 17th
    > Stockyards Hotel - Ft. Worth, Texas
    > www.ExcelUserConference.com
    >
    >
    > "ExcelMonkey" <[email protected]> wrote in message
    > news:[email protected]...
    > > Can anyone tell me how to find out what version of Excel and file was
    > > created
    > > in? I have a routine which inserts sheets into workbooks. However it
    > > fails
    > > on files that were used extensively in Excel 97. I want to put an error
    > > handler in that checks to see if the file in question was created/used

    in
    > > Excel 97.
    > >
    > > I am assuming that checking the version that it is currently in will not
    > > be
    > > efficient as a file created in Excel 97 will likely have been saved as
    > > more
    > > current versions. I know Tom Ogilvy has stated in an ealier post that

    you
    > > can look at the sheet names in the project window of the VBE to get a
    > > clue.
    > >
    > > For example, Sheet 16 in this file is named "Sheet16111111". Tom had
    > > stated
    > > that this was a clue. And if fact it is, you cannot insert sheets in

    this
    > > workbook via VBA.
    > >
    > > Thanks

    >
    >




  4. #4
    Michel Pierron
    Guest

    Re: What version Excel file was created in.

    Hi ExcelMonkey;
    You can use:
    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

    MP

    "ExcelMonkey" <[email protected]> a écrit dans le
    message de news: [email protected]...
    > Can anyone tell me how to find out what version of Excel and file was

    created
    > in? I have a routine which inserts sheets into workbooks. However it

    fails
    > on files that were used extensively in Excel 97. I want to put an error
    > handler in that checks to see if the file in question was created/used in
    > Excel 97.
    >
    > I am assuming that checking the version that it is currently in will not

    be
    > efficient as a file created in Excel 97 will likely have been saved as

    more
    > current versions. I know Tom Ogilvy has stated in an ealier post that you
    > can look at the sheet names in the project window of the VBE to get a

    clue.
    >
    > For example, Sheet 16 in this file is named "Sheet16111111". Tom had

    stated
    > that this was a clue. And if fact it is, you cannot insert sheets in this
    > workbook via VBA.
    >
    > Thanks




  5. #5
    Tushar Mehta
    Guest

    Re: What version Excel file was created in.

    The closest thing I can find is the workbook object's
    CalculationVersion property.

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>,
    [email protected] says...
    > Can anyone tell me how to find out what version of Excel and file was created
    > in? I have a routine which inserts sheets into workbooks. However it fails
    > on files that were used extensively in Excel 97. I want to put an error
    > handler in that checks to see if the file in question was created/used in
    > Excel 97.
    >
    > I am assuming that checking the version that it is currently in will not be
    > efficient as a file created in Excel 97 will likely have been saved as more
    > current versions. I know Tom Ogilvy has stated in an ealier post that you
    > can look at the sheet names in the project window of the VBE to get a clue.
    >
    > For example, Sheet 16 in this file is named "Sheet16111111". Tom had stated
    > that this was a clue. And if fact it is, you cannot insert sheets in this
    > workbook via VBA.
    >
    > Thanks
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1