GetObject on Excel 2019 RRS feed

  • Question

  • Can someone please check the following code using Excel 2019 on a Windows 10 64 computer?

            Dim oExcel As Excel.Workbook = Nothing

            oExcel = GetObject(path + filename) 'any valid path and name of an Excel workbook

            oExcel.Application.Visible = True

            oExcel.Windows(1).Visible = True

    Make sure that filename workbook is not opened before running the code and check if it opens the workbook correctly. 

    Using Visual Basic, Excel 2016 GetObject does not work correctly. It opens two Excel windows, which are blank  (no worksheets are displayed) and unresponsive. They have to be closed ending the task in Task Manager. 

    It did work with Excel 2010.


    • Edited by AntSalc Sunday, February 10, 2019 9:41 AM
    Saturday, February 9, 2019 3:58 PM

All replies

  • Hi AnSalc,

    Would you specify
    (1) programming language (Excel VBA?, VB.NET?)
    (2) more code (including "path", "filename")


    Ashidacchi --

    Saturday, February 9, 2019 10:59 PM
  • Hi Ashidacchi,

    I have updated my original post with the information that you requested.


    Monday, February 11, 2019 8:47 AM
  • Hi AntSalc,

    I hope you will
      (1) not edit your original post, unless it has spelling error or something like that.
      (2) not mix up between Visual Basic (AKA VB.NET) and Visual Basic Application (VBA).

    If your code works fine with Excel 2010, please check which architecture Excel 2019 is, i.e. 32-bit or 64-bit, and if it is the same as Excel 2010. 


    Ashidacchi --

    Monday, February 11, 2019 8:59 AM
  • This is a bug in Excel 2016 and Excel 2013 that I already reported to Microsoft.

    I am just trying to find out if Excel 2019 has the same bug.

    I am using the 32-bit version.

    Monday, February 11, 2019 8:15 PM
  • Hi AntSalc,

    I don't use Excel 2019, so cannot reproduce your issue.
    Please send a feedback to Excel User Voice


    Ashidacchi --

    Tuesday, February 12, 2019 1:08 AM