+ Reply to Thread
Results 1 to 5 of 5

unable to open excel file with a certain name

  1. #1
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    unable to open excel file with a certain name

    Suddenly when I open my Excel file (contains VBA code), it always gives me an error.
    The file has a Private Sub Workbook Open which contains some macros to run.

    The "debug" yellow line not always stop at the same code line.
    Even sometimes it gives me an error on a simple code something like
    Please Login or Register  to view this content.
    in one macro sub.

    and after I delete that line of code, then it stops at another macro sub.
    I've tried to delete all the macros to run in Private Sub Workbook Open.
    Now I can open file, but then if I run any macro, it hangs forever..
    so I have to use Task Manager "Processes" tab then kill Excel.Exe.

    Say, the name of this problem file is Tiger.
    While Excel app is close, I rename the file from "Tiger" to "Lion",
    but it still either crash (hang forever) or give me error (which can be debugged).
    I also have tried to SaveAs (after deleting the macros in Private Sub Workbook Open) the file as "Horse",
    but it still the same problem after I open the "Horse" file.

    Luckily, I have another file with the same macros with the problem file (but different data).
    I can open this file without problem. Duplicate it and name the duplicate one to "Bird"....
    open the problem file (after deleted the macros in Private Sub) then move the data to the "Bird" file.
    Now I can open the "Bird" file without problem and all other macros (including the macros in the Private Sub) run without error.

    BUT, after I rename the "Birds" to "Tiger", then the same problem back again.
    I can't open the "Tiger" file as it gives me the same problem, either it hangs forever or gives me an error.

    I need to have this file named "Tiger".
    How do I resolve the problem ?

    Any kind of help would be greatly appreciated.
    Thank you in advanced.
    Last edited by karmapala; 02-09-2019 at 02:51 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: weird problem when opening a certain name of Excel file.

    Thank you for your suggestion, AliGW.
    I have changed the title.
    I hope it's ok now.

  3. #3
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: unable to open excel file with a certain name

    You need to post the following information:
    1. All code in your ThisWorkbook code module.
    2. Any maros that are called by code in your ThisWorkbook code module.
    Or
    3. Click the Go Advanced button at the bottom of the reply window, then click Manage Attachments and follow the menu to upload your file, with all macros so we can look at it.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  4. #4
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: unable to open excel file with a certain name

    JLGWhiz,

    Thank you for the suggestion.
    Finally I've found the solution which is first I move the file into different hard drive.
    Then I rename it to "Tiger", and finally now I can open it without problem,
    even after that I put the "Tiger" file to the original hard drive there no problem anymore.

  5. #5
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: unable to open excel file with a certain name

    glad you found a solution and thanks for the feedback.
    Regards, JLG

+ 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, 02: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, 12:05 AM
  6. [SOLVED] Problem with opening an Excel - File
    By Roland S. in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  7. Problem with opening an Excel - File
    By Roland S. in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. Problem Opening An Excel file. - by yk
    By ilikecy in forum Excel General
    Replies: 0
    Last Post: 02-04-2005, 05:06 AM

Tags for this Thread

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