Results 1 to 6 of 6

Thread: Error opening an Excel workbook

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2005
    Location
    Missouri
    Posts
    69

    Error opening an Excel workbook

    Hello,

    I wrote a program in Visual Basic 6 whose only function is to automate entries on an Excel sheet. The program runs fine on my computer, but when I attempted to deploy it on a computer at work, via a deployment wizard it could not find Excel. The program came up and ran fine, but whenever I attempted to use its internal functions that open an existing Excel sheet, it crashes.

    I've been attempting to make a work around for the problem, by way of converting it to an Excel Add-In, but I've never worked with addins before. When I compile it as an addin, I'm given a .DLL file, and when I attempt to open an Add-In from Excel, .DLL is not one of the supported extentions.

    Any suggestions?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Error opening an Excel workbook

    You should have no problem deploying a VB program. Check out the Application Deployment forum. You could also visit www.*********** to get Inno Setup and Inno Script. They are an alternative to using the P&D Wizard.
    Randem is a member here. Check out the forum.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Error opening an Excel workbook

    Quote Originally Posted by Surveillance
    Hello,

    I wrote a program in Visual Basic 6 whose only function is to automate entries on an Excel sheet. The program runs fine on my computer, but when I attempted to deploy it on a computer at work, via a deployment wizard it could not find Excel. The program came up and ran fine, but whenever I attempted to use its internal functions that open an existing Excel sheet, it crashes.

    I've been attempting to make a work around for the problem, by way of converting it to an Excel Add-In, but I've never worked with addins before. When I compile it as an addin, I'm given a .DLL file, and when I attempt to open an Add-In from Excel, .DLL is not one of the supported extentions.

    Any suggestions?
    I'm going to ask the obvious question and that is: Is Excel installed on the target machine?

    If so (and I would assume that it is but I had to ask), what is the specific error you get when you try to open a worksheet? Is the worksheet also installed on the target machine (or, at least, accessible from the target machine...if it is on a network drive, does the target machine has access to that drive?)

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

    Re: Error opening an Excel workbook

    What version of Excel did you set a reference to in your project? What version of Excel is on the system at work, if any as Hack has already mentioned?

    An Excel Add-In is an *.xla extension generated from within Excel and not VB6.

    Moved from Classic VB.


    Note: w00t w00t - 18,000 Posts! Gangsta Yoda™ ®
    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

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2005
    Location
    Missouri
    Posts
    69

    Re: Error opening an Excel workbook

    Yes, Excel is installed on the target computer, though after fiddling with it some more today, there seems to be some sort of error with its installation. When I attempt to open an Excel file, the computer begins trying to install Excel again, though if I open the installed copy I can open other files fine.

    On the bright side, I feel better about my program... on the down side, I'm not in the MIS dept, and they don't know I'm attempting to install any such software, nor would they appreciate it if they found out I was, I think.

    Some people just don't understand efficiency. Heh.

    Thanks for the help, sorry to waste your time

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

    Re: Error opening an Excel workbook

    You can also tell them that if you messup the system, your only securing their job security or something like that. Just kidding though, dont want to irritate them since they are your lifeline to get permission to install things.

    If your getting the Installer dialog boxes then just run through them and finish installing the features of Excel that your needing. If you deployed Excel dlls or references then you may have overwrote the original ones and now it thinks it not installed. Remember that you can not legally deploy any Office references.
    Last edited by RobDog888; Sep 16th, 2005 at 09:52 AM.
    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