Can't open Excel File manually after MS Project has opened it via VBA

I was testing a section of code I got from a forum that opens a Excel Workbook via MS Project VBA so that I could use it to update a Excel Workbook that I have. The macro opens the Workbook as intended but the main problem I'm encountering is that
after I've run the macro, saved and closed the Workbook again, I'm unable to open it manually either from Recents or directly from folder location. I'm using Project 2010 (non Server) and Excel 2010 - Windows 7.
I'm also having trouble getting it to select "Sheet2" of the Workbook when it opens so I've Commented it out, but it would be a bonus if someone could shed some light on that one as well.
Edit: I worked out how to select the Sheet...I've updated the code Below. 
Sub OpenTest()
Dim xlApp As Excel.Application
Dim xlWkb As Excel.Workbook
Set xlApp = CreateObject("Excel.Application")
Set xlWkb = xlApp.Workbooks.Open_ ("C:\Users\myName\Desktop\Export Test1.xlsx")
xlApp.Visible = True
xlApp.Sheets("Sheet2").Select
Set xlWkb = Nothing
End Sub
Thanks!
Matt

Matt,
Actually your macro code works fine and I can re-open the file without problem.
I don't recall asking in your other post but do you have SP2 installed for Project 2010? And, do you have SP2 installed for Office 2010, which will cover Excel? They are separate updates. It would also be a good idea to install the June 2013 cumulative update
for Project 2010 as it was released after SP2 and it does fix some VBA issues as I recall.
As I indicated, your code works fine on my PC which is also Project 2010, Office 2010 and Windows 7. Try this. After you run the macro and then save and close the workbook, does Excel also get closed automatically? If it does, (and it should), after you
close the workbook, take a look at the applications manager to see which Windows applications are currently running. Does Excel still show up?
John

Similar Messages

  • Some users can't open Excel files. It is trying to open it in Internet Explorer "An error has occurred. Please try again."

    I have some users in my company that can't open Excel files from any document libraries on SharePoint 2010. The receive the error message "An error occurred. Please try again."  We don't currently use the Excel calculations services. When
    a user opens an excel file they are prompted to either Read Only or Edit.
    This affects less than 5 people in a large company.  They have the Full Control permissions and have been able to open the files previously.  There has been no changes made to the server either.  I can't find anything that points to this in the
    event viewer. 
    It doesn't matter if which computer that they try to open this up from either.   All computers are Windows 7 Professional with IE 9 and Office 2010 x64.   
    I can't find anything that points specifically to this exact error. None of the excel files contain pivot tables.    This one has me stumped.

    I would make sure no one has open on machine / locked on machine (Would assume you checked this, but wanted to add)
    Also would have assumed you restarted the machines (:))
    Make sure the file security did not change (check to ensure no one changed the sercuity of the excel)
    Make sure the version of excel is the same (Changing from 2010 back to 2007 affects the file, etc.. on convert) that no one converted and saved thus causing error in file.
    Can they open other excel files?
    It sounds like the excel file it self has changed if you cannot see issue in SharePoint logs.
    If it is all SharePoint excel files - try deleting one persons access and readding them to see if that helps.
    SharePoint has issues ;)

  • Can't open excel file after saving and closing excel with activex

    I'm using activex to write and save excel files in LabVIEW. My application opens excel (not visible)writes a file, saves it, and then closes both the file and excel. When I try to open the file Excel opens but the file is not displayed, I see the excel header and footer but the file itself does not display. My application is still running at this point. Any suggestions?

    It is critical when using ActiveX with Excel that ALL refnums be properly closed when they are no longer used. Just a single refnum left open will cause the exact situation that you describe. Typically, but not required, the refnums will be closed in the reverse order in which they were created. Here is a good sequence:
    Open Application ref
    Property Workbooks ref
    Open Workbook ref
    Close Workbooks ref
    Select Sheet ref
    Select Range ref
    Write Value2 to Range
    Close Range ref
    Close Sheet ref
    Save Workbook
    Close Workbook ref
    Close Application ref
    When you have properly closed all refnums, the problem will disappear.
    Michael Munroe
    Certified LabVIEW Developer
    www.abcdef.biz
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • Cannot Open Excel File after exporting from Disco Plus

    Hi there,
    I got a question from one user having issue with opening Excel file after exporting from Disco Plus.
    The report has been using for a while and he is using Excel 2003 version and Discoverer 10g(10.1.2.2), he never got this kind of error before, just recently got error.
    After exporting from Disco Plus he saved file on his desktop and when he tries to open the excel it says "Cannot be Accessed, can be corrupted...." but this is not from network drive since he saved file on local desktop or C drive.
    Also not for all reports, only this particular report and only specific parameter, for example for parameter 2008 Feb opened successfully, but for2009 Feb he gets this error when trying to open excel.
    i tried in excel 2007 also , i dont think this is Excel version error, am not sure.
    Also after go live last week (we upgraded database from 9i to 10g) but i am not sure this causes ,since for one parameter working, for other parameter not working.
    Actually we should get one window for Macro when we try to open excel, but he is not getting it seems.
    Any ideas/thoughts on this would be greatly appreciated.
    Thanks for your help
    --skat                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Rod,
    Thanks for your quick response on this.
    Yes, we can export to other formats as well, but actually exporting is working, after saving the file on our local desktop/drive and when we try to open we get this kind messages or we cannot open the file, we should get message window for Macro to enable/disable but for this report we are not getting this either,
    Also this happens only for specific parameters,like i mentioned above it works I mean excel file opens for one set of parameters but for some other set of parameters cannot open.
    For example :- when we enter FEB 2008 it works, if we enter FEB 2009 it won't open the file.
    This is weird
    I am still working on this issue, may be better to recreate the report again might be helpful,
    Any ideas/comments/thoughts would be great
    Thanks
    Skat

  • Can't open Excel files from Sharepoint 2013

    I am having an issue with opening Excel files from SharePoint 2013. If I click on an excel file it comes up with the error below.
    If I click Try again I get the message below also:
    If I try to open Word or PDF files they open correctly in the appropriate client and I have the option of checking them out and editing them. Any ideas why this would only be happening to Excel files?
    Thanks,
    Shaun

    Hi Shaun,
    I understand that the Excel files cannot be opened from SharePoint in Microsoft Excel.
    Can these files be viewed in the browser?
    I recommend to download a copy of the files with issue and then open them in Excel to see if the issue still occurs.
    If above cannot work, I recommend to repair Office.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Can't open Excel files with Numbers

    Hi,
    I'm having troubles when I try to open Excel files with Numbers. The iWork program simply shuts down and a message appears, telling that a "sudden problem happened".
    Can anyone help here? I really appreciate.
    Rafinha

    Hi Rafinh,
    Welcome to Numbers discussions.
    Numbers will open Excel documents. Sometimes deleting the Numbers Preference file will do the trick. Close Numbers then delete the Numbers preference file: home > Library > Preferences, com.apple.iWork.Numbers.plist
    In the upper right of this window click Search thousands of questions have been asked and answered.
    These Discussions are enduser helping enduser, not Apple employees answering questions. Questions will be answered when a enduser such as yourself finds time, desires to, knows the answer along with the time to respond.
    Again, welcome to Numbers Discussions, have fun here.
    Cordially,
    RicD

  • Why can't I open excel files larger than 500 kb?

    Seems as though Excel files (.xlsx format) smaller than 500 KB's that are sent via email open just fine, but anything larger will not open. I'm not sure if this is a Numbers issue or an issue with the Mail app. Started happening ever since the iOS 7.1 update as well as a recent Numbers update (not sure what version of Numbers I was using before).

    I will have this moved to the Numbers for iOS forum since your question seems to be about opening Excel files in Numbers on an iPad.

  • How to list all currently open Excel files with ActiveX?

    Hello all!
    I would like to program with ActiveX a way to retrieve a list (array of strings) of the filenames of the currently opened Excel files in windows. However, I am fairly new to the ActiveX/Excel business in LV and after hours looking at the "millions" of objects in the property nodes I give up and hope some kind soul here can help me. I couldn't find any information in this forum regarding the same issue, although some were close
    I am using LV 7.1 without the Report Generation Toolkit.
    Thanks!
    /Goran

    Hi KC,
    thanks for your reply. I have in fact been able to find the desired things in the ActiveX properties/methods for Excel in LabView. It took me some looong work going through the functions which I suspected to be the ones. Anyway, I post a little jpeg here of the code if someone ever needs the same functionality. What it does is that it checks how many Excel workbooks are open and controls if each of them matches the searched Excel filename, if one does, it is closed.
    Enjoy
    /Goran
    Attachments:
    List open excel sheets and close open ones.jpg ‏104 KB

  • Outlook 2010 opening excel files in grey exel sheet/not correctly

    Hi,
    i have a user with a brand new install of Windows 7 64X and Office 2010 32X. The user is having the issue of when trying to open excel spread sheets from outlook that they open in a grey window and nothing in it. See attachedpicture
    The user can preview the file fine in outlook, and if they save the file and open it it works fine. but when trying to open directly from outlook it opens in a grey window.
    I have tired disabling all protected views in excel and word. i have removed all add ons from excel and outlook. and have run outlook in safe mode and still same results.
    i have repaired office, and removed it and reinstalled it to no luck. I have found a work around, if i get outlook to start as "Run as administrator" then its works.
    Any Help i would be greatful
    Kind Regards
    SF

    Hi,
    The most common cause is that Excel has been configured to ignore other applications. This is an option that is disabled by default but can be enabled to isolate the Excel working environment. When the option is enabled, you can only open Excel attachments
    from within Excel itself.
    To disable this option you can do the following:
    Open Excel, click File -> Options -> Advanced-> General -> Untick "Ignore other applications that use Dynamic Data Exchange (DDE)" -> OK.
    After setting this option, close Excel. Open the attachment in Outlook to check the result.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Problem opening excel files exported from Discoverer Plus 10.1.2.48.18

    I can't open excel files (xls) exported from Discoverer Plus 10.1.2.48.18 when I enable macros. The application (Excel) hangs up.
    Someone have any idea about this?
    Thanks,
    Diego

    Hi Meifang
    I did some more research and found a document on MetaLink 250820.1 that talks about Discoverer not being able to call Excel if Discoverer is running via an IP address instead of a qualified domain name.
    The article talks about making Discoverer a trusted site in the Internet Options of IE. Here's the relevant info from the posting:
    Workaround for MS IE (if necessary):
    1. Open a new MS IE browser
    2. Navigate to: Tools | Internet Options Security where you will see the Trusted Sites icon (green icon with a check mark)
    3. Click the Sites button
    4. Add the following: http://IP:port/
    (where IP, port are the location of where Discoverer server is running)
    5. Click the OK button
    6. Click the OK button again
    On my own PC, I was having a similar problem and I was unable to get Excel to launch. In the end I did this:
    1. Open a new MS IE browser
    2. Navigate to: Tools | Internet Options | Security where you will see the Local Intranet icon (computer icon against a globe)
    3. Click the Local Intranet button
    4. Click the Sites button
    5. Click the Advanced button
    6. Add the following: http://IP/ or http://website
    (where IP or website are the location of where Discoverer server is running)
    7. Click the Add button
    8. Click the OK button
    9. Click the OK button again
    10. Click the OK button a third time
    With this done, I made sure that my Explorer settings were correct by doing the following to ensure that a couple of settings for the .xls & .html file types are unchecked:
    1. Open Windows Explorer
    2. Navigate to: Tools | Folder Options | File Types tab
    3. Highlight the Extension XLS (or HTML)
    4. Click the Advanced button
    5. At the botton of the screen are three settings that use checkboxes. If either of the following two are checked, un-check them:
    Confirm Open after Download and Browse in same window
    6. Click the OK button
    7. Click the Apply button
    8. Re-boot the PC
    After I did this I was successfully able to get Excel to open from within Discoverer.
    Best wishes
    Michael

  • "File Now Available" when opening Excel File

    When I open an excel file from using the OpenFileDialog VB, there is a bit of a delay.  After a few seconds a dialog box pops up saying:
    "File Now Available"
    This has two buttons "Read-Write" and "Cancel"
    1) How do turn the alerts off and have it default to Read Write?
    2) The delay in opening can cause issues as the user will not know that there is in fact a delay.  The user may then proceed through my form and press the OK button which will cause an error.  How do I show a status bar to alert the user that there is some Excel process running in the background (i.e. slowling opening the file) when using the OpenFileDialog? Worse case scenario I can set the enable property of the OK button to False until the file is open. 
    Thanks
    EM

    Two thougths -
    Use this:
    Private Function IsFileOpen(strFullFilePath As String) As Boolean
    'http://www.xcelfiles.com/IsFileOpen.html
    'Check if File is Open.  Works for Excel files, but not text files.
        Dim hdlFile As Long
        'Error is generated if you try opening a File for ReadWrite lock >> MUST BE OPEN!
        On Error GoTo errsub:
        hdlFile = FreeFile
        Open strFullFilePath For Random Access Read Write Lock Read Write As hdlFile
        IsFileOpen = False
        Close hdlFile
        Exit Function
    errsub: 'Someone has file open
        IsFileOpen = True
        Close hdlFile
    End Function
    Or just access the Excel file without "opening it" at all using OLE DB (use SQL to modify it) or ExecuteExcel4Macro.
    Cheers

  • Cannot open excel files in iOS4

    As soon as I upgraded to iOS4, I have been unable to open excel files. Sometimes I get a can't open error, sometimes it crashes and goes back to the homescreen and with some excel files it works. A Genius at the store was able to open one after he re-saved the file on his mac but suggested this inconsistency was a bug that Apple would fix. I get a lot of excel files from many difference people for business and this is a real obstacle. Does anyone know how to fix or if Apple will. Thanks.

    Many are experiencing this issue. We are an software development and Managed IT services shop and all of our clients are experiencing this same issue when trying to open an Excel file created by SSRS.
    Follow this post: http://discussions.apple.com/thread.jspa?messageID=11843341

  • Problem in opening excel file in different window

    hi
    i want to open excel file in different window it open in same window properly on the bases of condition but when i try to open in different with window.open( )
    it give error that file has already used or path not exist OR requisted site either unavailable
    how can i rectified

    Hi.
    I am too facing the same problem. I am using Jakarta Poi to display my resultset in an excel sheet directly(and not into a jsp)
    The browser opens a window showing Open Save Cancel. If i click and save the excel sheet and then open, it opens. But clicking on Open directly doesnt open the excel sheet. Rather it gives the same error
    The file name or path name does not exist.
    The file you are trying to open is being used by another progrtam . close the document in other program and try again
    The name of the work book your tring to save is the same as name of another document that is readonly .try saving workbook with different name
    Can somebody please help me fix this problem, since its an urgent requirement. Mail me at [email protected]
    Thanks
    Hitesh

  • Cannot open Excel files on Windows share and ONLY Excel files

    I'm browsing a Windows share and for whatever reason it will not let me open Excel files directly from the network location. If I view the Coverflow, I can see a a preview of the actual file as well as copy it to the desktop and open it.
    I receive an error message that says "filename.xls could not be found."
    I can open up any other file from the network location, but not Excel files.
    I checked the file permissions and they mirror the other file types, it may be worth mentioning that I utilize network synchronization and view these files from a PC as well. I also noticed when I create a new file in that location, it will only appear in OS X and not Windows, but is still completely accessible.
    Any help is appreciated!
    Thanks

    Re:  Windows 8 vs. Excel problem
    Does your new Dell computer have MS Office installed?
    Jim Cone
    Portland, Oregon USA
    https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

  • Opening Excel file in HTML

    Hi All,
    Does anyone know how to launch Excel file in HTML or jsp?
    Wait...i know one method to open Excel fiel using
    Window.open(blah...blah..)
    In this case we can specify toolbar option..
    But in my application i am loading excel file in frame.But frame doesnt have any option to set toolbar.....
    Please let me know if you have soln for this....
    Regards,
    Surya

    Hi,
    I can open excel file using window.open...but my requirement is forcing me to open it in frame....And i m able to open it properly in frame...but i want toolbar to come along with that frame...
    according to folowing lin they say it is not possible have scenario like this...
    http://support.microsoft.com/kb/157353/EN-US/
    Please see whether you can help in this regard...

Maybe you are looking for

  • How can I modify ONE CHARACTER in the file name???

    I have in right side meta tag panel a file name , original name and copy name fields. The file was already renamed. So i am not interested original file name ,anyway i cant click on it. I would like to modify ONE +"!/"%/"+! CHARACTER in filename fiel

  • OUTLOOK DOES NOT SYNC

    OUTLOOK DOES NOT SYNC WITH SAGE SOFTWARE.

  • Problem when created an Inspection Lot.

    Hello PP Guru's, I have a major problem with Inspection Lot. I have created an Inspection Lot but forgot to create an Inspection Plan for the Material for which the lot has been created.The Inspection Lot is in CRTD status which doesnt allow me to re

  • Error during ant build

    Hi guys I am getting the following error when i try to build my project using ant 1.6 {color:#ff0000} error in opening zip file [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for detai

  • My X61 can't connect wireless when i use battery!!!

    TYPE NO.:  7673-AN6 i confused why it can not connect wireless when i use battery?! the problem drive me crazy nearly, it means i must take adapter every time i help every one can help me! cheers,