+ Reply to Thread
Results 1 to 4 of 4

Problem opening an Excel file

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    583

    Problem opening an Excel file

    Having a weird problem which just started within the last couple of months with an ongoing project that i keep adding onto.

    The subject file is rather large by my standards, 4.36MB with something like 1,200 procedures and maybe 40,000 lines of code if i recall.

    If i try to click on Excel and select the file from the opening file selection window, after a period of time Excel simply disappears, but if i start Excel, open a new blank workbook, and then go to File:Open and select the workbook, it will open (albeit though it takes a little time).

    I tried dropping a code line of Stop in the workbook_open code, but it seems it doesn't get to that before it hangs and quits.

    I do have a number of PUBLIC declarations, which now i must think should be my next step to investigate.

    Any thoughts on what else i should look at? If i had a better idea of the mechanics of the Excel startup routines i might be able to figure out more on my own, but other than guessing that it might go after the public declarations prior to loading and running code, i'm just shooting in the dark-

    I'd hate to have this thing, aptly named "Kraken", bomb out now. I've been adding on to it for the last three years! The sick thing is that i am now mainly working on trying to optimize the code...

    Thank-you all for your thoughts, and MERRY CHRISTMAS!!!

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Problem opening an Excel file

    Start with a blank workbook and copy in your code, then your sheets one at a time. Try to open the workbook after each change to see if you can isolate the issue.

  3. #3
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Problem opening an Excel file

    How big is your largest module? I hear that can cause issues - you could try splitting the largest one up into two. And I think there is a limit on how many public declarations you can handle - you could try reducing that if you have a huge amount.

    Maybe the forum can suggest some better (in this case more stable) ways to do what you are doing.
    Last edited by scottiex; 12-02-2018 at 09:27 PM.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  4. #4
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    583

    Re: Problem opening an Excel file

    Dang. Must of been one of those Office 365 "improvements". Because the majority of my procedures use the same two listobjects, i publicly scoped them. This worked fine for a number of months. Can't do that anymore, at least not with this...

    I just went on a search for every single procedure that used each of them and "Dim"ed and "Set" each into the procedure individually... All loads proper now.

+ 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. [SOLVED] [HELP] Problem when opening an excel file
    By Cessh in forum Excel General
    Replies: 6
    Last Post: 10-17-2013, 02:34 AM
  2. Replies: 0
    Last Post: 09-06-2013, 05:31 AM
  3. Opening an Excel file Problem
    By Shevira in forum Excel General
    Replies: 2
    Last Post: 10-11-2006, 02:26 PM
  4. Problem with opening an Excel - File
    By Roland S. in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  5. [SOLVED] Problem with opening an Excel - File
    By Roland S. in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. [SOLVED] Problem with opening an Excel - File
    By Roland S. in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. Problem with opening an Excel - File
    By Roland S. in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. [SOLVED] Problem Opening An Excel file. - by yk
    By ilikecy in forum Excel General
    Replies: 0
    Last Post: 02-04-2005, 05:06 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