+ Reply to Thread
Results 1 to 4 of 4

Dealing with different version of Excel using Visual Basic 6

  1. #1
    khundeen
    Guest

    Dealing with different version of Excel using Visual Basic 6

    I am writing Excel automation using Visual basic 6.

    The application is supposed to read the excel file created by the
    Office 2003 version. I also have Office 2003 on my machine so I set my
    reference to "Microsoft Excel 11.0 Object Library"

    Now when I try to run the program on the computer that doesn't have
    Office 2003 but has Office 2000, it crashed.

    Can you let me know how to handle this problem.

    I do have the error handling section to display the error but it seems
    that the program try to execute but got Error "An exception "Unhandled
    Win 32 Exception" has occured in Program.exe"

    I would like to check if the excel on the machine is not version 2003
    and just abort the program without crashing.

    Can anyone help with the sample of source code to determine the version
    of Excel in the computer?

    Thanks,
    Deen


  2. #2
    Bob Phillips
    Guest

    Re: Dealing with different version of Excel using Visual Basic 6

    Load your program on a machine with Office 2000, and set a reference to that
    (9.0?). Then when you migrate up to 2003 all will be well. Always develop
    with the lowest deployment version.

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "khundeen" <[email protected]> wrote in message
    news:[email protected]...
    > I am writing Excel automation using Visual basic 6.
    >
    > The application is supposed to read the excel file created by the
    > Office 2003 version. I also have Office 2003 on my machine so I set my
    > reference to "Microsoft Excel 11.0 Object Library"
    >
    > Now when I try to run the program on the computer that doesn't have
    > Office 2003 but has Office 2000, it crashed.
    >
    > Can you let me know how to handle this problem.
    >
    > I do have the error handling section to display the error but it seems
    > that the program try to execute but got Error "An exception "Unhandled
    > Win 32 Exception" has occured in Program.exe"
    >
    > I would like to check if the excel on the machine is not version 2003
    > and just abort the program without crashing.
    >
    > Can anyone help with the sample of source code to determine the version
    > of Excel in the computer?
    >
    > Thanks,
    > Deen
    >




  3. #3
    khundeen
    Guest

    Re: Dealing with different version of Excel using Visual Basic 6

    So I basically need to set reference to Excel 9.0? Do I also need to
    set to 11.0 when I develop on my main computer that have office 2003?

    Perhaps I can install both on my development machine? Will it get any
    conflict?

    Thanks.
    Deen


    Bob Phillips wrote:
    > Load your program on a machine with Office 2000, and set a reference to that
    > (9.0?). Then when you migrate up to 2003 all will be well. Always develop
    > with the lowest deployment version.
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (replace somewhere in email address with gmail if mailing direct)
    >
    > "khundeen" <[email protected]> wrote in message
    > news:[email protected]...
    > > I am writing Excel automation using Visual basic 6.
    > >
    > > The application is supposed to read the excel file created by the
    > > Office 2003 version. I also have Office 2003 on my machine so I set my
    > > reference to "Microsoft Excel 11.0 Object Library"
    > >
    > > Now when I try to run the program on the computer that doesn't have
    > > Office 2003 but has Office 2000, it crashed.
    > >
    > > Can you let me know how to handle this problem.
    > >
    > > I do have the error handling section to display the error but it seems
    > > that the program try to execute but got Error "An exception "Unhandled
    > > Win 32 Exception" has occured in Program.exe"
    > >
    > > I would like to check if the excel on the machine is not version 2003
    > > and just abort the program without crashing.
    > >
    > > Can anyone help with the sample of source code to determine the version
    > > of Excel in the computer?
    > >
    > > Thanks,
    > > Deen
    > >



  4. #4
    Bob Phillips
    Guest

    Re: Dealing with different version of Excel using Visual Basic 6

    No, the whole point of my response is that you only ever set it Excel 9.0,
    and when you deploy on a later version machine, Excel/VBA will manage it (It
    doesn't do it the other way).

    You could install both on one machine (I have 97, 2000 and XP on this
    machine), but I only see the OL of the latest version in Tools>References.
    If I installed them in reverse order, I assume I would only see the Excel
    8.0 OL, being that Excel 97 would be my default Excel, and I also assume I
    could browse for the other libraries and thereby manually load them. But all
    that is not necessary. If you have a machine with 2000 on, just develop on
    that machine.

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "khundeen" <[email protected]> wrote in message
    news:[email protected]...
    > So I basically need to set reference to Excel 9.0? Do I also need to
    > set to 11.0 when I develop on my main computer that have office 2003?
    >
    > Perhaps I can install both on my development machine? Will it get any
    > conflict?
    >
    > Thanks.
    > Deen
    >
    >
    > Bob Phillips wrote:
    > > Load your program on a machine with Office 2000, and set a reference to

    that
    > > (9.0?). Then when you migrate up to 2003 all will be well. Always

    develop
    > > with the lowest deployment version.
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > (replace somewhere in email address with gmail if mailing direct)
    > >
    > > "khundeen" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I am writing Excel automation using Visual basic 6.
    > > >
    > > > The application is supposed to read the excel file created by the
    > > > Office 2003 version. I also have Office 2003 on my machine so I set

    my
    > > > reference to "Microsoft Excel 11.0 Object Library"
    > > >
    > > > Now when I try to run the program on the computer that doesn't have
    > > > Office 2003 but has Office 2000, it crashed.
    > > >
    > > > Can you let me know how to handle this problem.
    > > >
    > > > I do have the error handling section to display the error but it seems
    > > > that the program try to execute but got Error "An exception "Unhandled
    > > > Win 32 Exception" has occured in Program.exe"
    > > >
    > > > I would like to check if the excel on the machine is not version 2003
    > > > and just abort the program without crashing.
    > > >
    > > > Can anyone help with the sample of source code to determine the

    version
    > > > of Excel in the computer?
    > > >
    > > > Thanks,
    > > > Deen
    > > >

    >




+ 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