Results 1 to 5 of 5

Thread: [RESOLVED] Spreadsheet Save File Exception 0x800A03EC

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    10

    Resolved [RESOLVED] Spreadsheet Save File Exception 0x800A03EC

    Iím having a problem with a section of code that was previously working on a Win7 system with VS 2017 Express. I'm now using VS 2017 Pro on a Win10 system.

    When I try to save an Excel spreadsheet file, the following code runs:

    Code:
        Private Sub saveOutputBT_Click(sender As Object, e As EventArgs) Handles saveOutputBT.Click
            System.IO.Directory.CreateDirectory(outPathNameStr)
    
            UpdateSummarySheet()
    
            APP.ActiveWorkbook.SaveAs(fullPath)
            APP.ActiveWorkbook.Close()
            APP.Quit()
    
            Call releaseObj(Summarysheet)
            Call releaseObj(Gensheet)
            Call releaseObj(CALsheet)
            Call releaseObj(PNsheet)
            Call releaseObj(Spursheet)
            Call releaseObj(Harsheet)
    
    
            Call releaseObj(CFGbook)
            Call releaseObj(APP)
    
        End Sub
    The "CreateDirectory" line works. The directory gets created, but this line:

    Code:
    APP.ActiveWorkbook.SaveAs(fullPath)
    does not save the spreadsheet (as it used to), and it generates the following exception:

    Name:  VS2017 save file exception.jpg
Views: 113
Size:  54.4 KB

    Any ideas?
    Last edited by bemoore; May 12th, 2021 at 02:51 PM. Reason: add exception ID#

  2. #2
    Frenzied Member jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    1,838

    Re: Spreadsheet Save File Exception 0x800A03EC


  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    10

    Re: Spreadsheet Save File Exception 0x800A03EC

    Quote Originally Posted by jdc2000 View Post
    In the example linked, someone made the comment,

    "It's a curious fact that "SaveCopyAs" method works fine. The only problem with it is that it takes only one parameter - the filename. You supply Type.Missing for almost all other params"

    But there are no examples of how to supply the Type.Missing parameters. Microsoft help is no help either. How do I specify the full path?

  4. #4
    Frenzied Member jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    1,838

    Re: Spreadsheet Save File Exception 0x800A03EC


  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    10

    Re: Spreadsheet Save File Exception 0x800A03EC

    I figured it out. I was able to get the SaveAs command and the SaveCopyAs command to work. What didn't work was the file name. It had ":" (colons) in it. Somehow the formatting for the date string changed somewhere along the way.

    Thanks for the help.

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