+ Reply to Thread
Results 1 to 1 of 1

Exception from HRESULT: 0x800A03EC on opening

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    U.K
    MS-Off Ver
    Excel 2016
    Posts
    101

    Exception from HRESULT: 0x800A03EC on opening

    Hi all,

    I have a workbook that i have been working on for a while now that contains quite a lot of code, several tables and a lot of data. Recently on opening the file i have been getting an error (Exception from HRESULT: 0x800A03EC) when i click ok the woorkbook seems to be working just fine. Part of the code i have used is to hide the excel menus, and remove borders from userforms.

    Hide excel menus.

    Private Sub Workbook_Open()
    ThisWorkbook.Application.ExecuteExcel4Macro "show.toolbar(""Ribbon"",False)"
    ActiveWindow.DisplayWorkbookTabs = False
    Application.DisplayStatusBar = False
    End Sub
    Remove userform header and border.

    Private Declare PtrSafe Function FindWindow Lib "User32" _
    Alias "FindWindowA" ( _
    ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Long
     
    Private Declare PtrSafe Function GetWindowLong Lib "User32" _
    Alias "GetWindowLongA" ( _
    ByVal hwnd As Long, _
    ByVal nIndex As Long) As Long
     
    Private Declare PtrSafe Function SetWindowLong Lib "User32" _
    Alias "SetWindowLongA" (ByVal hwnd As Long, _
    ByVal nIndex As Long, _
    ByVal dwNewLong As Long) As Long
     
    Private Declare PtrSafe Function DrawMenuBar Lib "User32" ( _
    ByVal hwnd As Long) As Long
     
    Sub RemoveCaption(objForm As Object)
         
        Dim lStyle          As Long
        Dim hMenu           As Long
        Dim mhWndForm       As Long
         
        If Val(Application.Version) < 9 Then
            mhWndForm = FindWindow("ThunderXFrame", objForm.Caption) 'XL97
        Else
            mhWndForm = FindWindow("ThunderDFrame", objForm.Caption) 'XL2000+
        End If
        lStyle = GetWindowLong(mhWndForm, -16)
        lStyle = lStyle And Not &HC00000
        SetWindowLong mhWndForm, -16, lStyle
        DrawMenuBar mhWndForm
         
    End Sub
    Each userform has the below code.

    Private Sub UserForm_Initialize()
    Call RemoveCaption(Me)
    End Sub
    I also have a connection that just duplicates a table, one table shows all data and the duplicate is filtered.

    I am running

    Window 10 64bit
    Excel 2016

    I have attached a log file of the error.

    Any body have any ideas
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 11-12-2013, 03:08 AM
  2. Copy a worksheet throws "Exception from HRESULT: 0x800A03EC."
    By i3tech in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-15-2006, 08:40 AM
  3. Exception from HRESULT: 0x800A03EC
    By nano2k in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 07-21-2006, 07:20 AM
  4. Exception from HRESULT: 0x800AC472
    By knikkix@yahoo.com in forum Excel General
    Replies: 0
    Last Post: 05-30-2006, 04:10 PM
  5. [SOLVED] Exception from HRESULT: 0x800A03EC. at Microsoft.Office.Interop.Excel.WorkbookClass.get_VBProject()
    By knocksidd@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2006, 11:45 AM
  6. HRESULT: 0x800A03EC setting DataSource for pivot tables.
    By katherineolson@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2006, 05:00 AM
  7. [SOLVED] Excel returns hresult 0x800A03EC at inserting Hyperlinks (C#)
    By Matthias Kwiedor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-20-2005, 06:05 AM
  8. VSTO2005 - HResult Exception obtaining Range Object
    By Jay Pondy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2005, 10:05 AM

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