CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010
    Posts
    24

    What the hell does this mean--> 0x800A03EC HRESULT EXCEPTION

    Whilst trying to load information from an Excel File I have, I get the following message:

    System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC

    from this:

    Code:
    Dim strFileTeam As String
            Dim objExcel As Excel.Application
            Dim objWorkbook As Excel.Workbook
            Dim objSheet As Excel.Worksheet
            strFileTeam = My.Application.Info.DirectoryPath & "\teams.xlsx"
            objExcel = StartExcel(True)
            Try
                objWorkbook = objExcel.Workbooks.Add(strFileTeam)
                objSheet = objWorkbook.Sheets("Team1")
    
                MsgBox(objSheet.Cells("A", "1"))
            Catch ex As Exception
                MsgBox(ex.ToString)
            End Try
    from the
    Code:
    objWorkbook = objExcel.Workbooks.Add(strFileTeam)
    line in particular

    I am pulling my hair out... I need serious help guys

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: What the hell does this mean--> 0x800A03EC HRESULT EXCEPTION

    Probably don't have PERMISSION to create a file in that folder.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Sep 2010
    Posts
    24

    Re: What the hell does this mean--> 0x800A03EC HRESULT EXCEPTION

    Quote Originally Posted by dglienna View Post
    Probably don't have PERMISSION to create a file in that folder.
    THANK YOU! I'm an idiot... I'm not creating one, I'm opening one... its .Open() not .Add

    Thanks again dglienna, when you stated "create a file" it clicked and I laughed for about an hour because of my stupidity

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: What the hell does this mean--> 0x800A03EC HRESULT EXCEPTION

    We all learn... Please mark the thread RESOLVED using the TOOLS
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured