Results 1 to 12 of 12

Thread: Excel 2000 v. 2003

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Location
    Virginia Beach, VA USA
    Posts
    4

    Excel 2000 v. 2003

    I have recently received a new version of software we run in-house; the developer has upgraded from Office 2000 to Office 2003. The app is written in VB6 and generates an Excel spreadsheet. It is crashing at some point in the process-- I do not have access to the source code, but I suspect it is at the time of saving the workbook. The developer no longer has access to Office 2000.

    I've decuded that the object libraries are not backwards compatible, but the 9.0 library is no longer available to the developer.

    Is there any way to work around this without us upgrading all our machines to Office 2003?
    Last edited by Lord Bodak; Oct 27th, 2005 at 02:28 PM.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Excel 2000 v. 2003

    Welcome to VBF, Lord Bodak!

    Most common functionality in any of MS Office products is backword compatible so that shouldn't be an issue. However, if developer usetilized what so called early bindings (he used references to Excel library during development wich was distributed along with application) then since it's not installed on the destination machine it may (but not necessary) cause some problems such "ActiveX component cannot create object...". If that's the case then suggest him to use late bindings instead using CreateObject VB's native function to instanciate what's installed on the machine.

    Also, this is like shooting in the dark - it would be nice to see some code...

  3. #3

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Location
    Virginia Beach, VA USA
    Posts
    4

    Re: Excel 2000 v. 2003

    The developer is going to try changing:
    Dim xlApp As Excel.Application
    Set xlApp = New Excel.Application

    To:
    Dim xlApp As Object
    Set xlApp = CreateObject("Excel.Application")

    And removing the reference. Seems like that should work, from some things I've found in the archives here.

  5. #5

  6. #6
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Excel 2000 v. 2003

    u are correct.. there is probably a function being used that works for 2003 & is not in 2000

    not sure.. can u just put the OLB file back in?? (EXCEL9.OLB) never tried it..

    It sounds like it would be better for the Developer to install Excel2000 than to have everyone upgrade.. If u are the "customer" than the Developer should comply
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  7. #7
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Excel 2000 v. 2003

    Quote Originally Posted by [A51g]Static
    ...It sounds like it would be better for the Developer to install Excel2000 than to have everyone upgrade.. If u are the "customer" than the Developer should comply
    Indeed and I would second that opinion.

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Excel 2000 v. 2003

    Correct Geoff. When developing for multiple versions you should always make sure you either handle different versions in the code or you only utilize functions, methods, and properties that are available in the earliest version that your supporting.

    Moved from Classic VB forum.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Location
    Virginia Beach, VA USA
    Posts
    4

    Re: Excel 2000 v. 2003

    Quote Originally Posted by RhinoBull
    That's exactly what I've suggested, though. That is very common trap many get into ...
    Now, removing the reference will break any uses of Excel constants though, won't it? That could be a problem.

  10. #10

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Location
    Virginia Beach, VA USA
    Posts
    4

    Re: Excel 2000 v. 2003

    Quote Originally Posted by RobDog888
    Correct Geoff. When developing for multiple versions you should always make sure you either handle different versions in the code or you only utilize functions, methods, and properties that are available in the earliest version that your supporting.
    I agree but, as far as I was told, no code actually changed. Office 2000 was removed, Office 2003 was installed, the Excel 11.0 reference was added, and the program was recompiled. So there aren't any 2003-specific functions in the code.

  11. #11
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Excel 2000 v. 2003

    Quote Originally Posted by Lord Bodak
    Now, removing the reference will break any uses of Excel constants though, won't it? That could be a problem.
    Oh yes it will, indeed. What he has to do is either use NUMERIC representation fo each Excel's const or declare them individually or some sort of Enum but he MUST determine values before in debug. Here is a sample that I use in some of my apps to outline specific cell(s):
    VB Code:
    1. Private Enum ExlBorder
    2.     xlEdgeLeft = 7
    3.     xlEdgeTop = 8
    4.     xlEdgeBottom = 9
    5.     xlEdgeRight = 10
    6. End Enum

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Excel 2000 v. 2003

    Quote Originally Posted by Lord Bodak
    I agree but, as far as I was told, no code actually changed. Office 2000 was removed, Office 2003 was installed, the Excel 11.0 reference was added, and the program was recompiled. So there aren't any 2003-specific functions in the code.
    If your changing the Reference in your VB 6 project from 2000 to 2003 then there is something that has changed in your app. It will now require Excel 2003 as the reference is to different dependancy files. You must use late binding to support multiple versions.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width