+ Reply to Thread
Results 1 to 4 of 4

Excel file is already open-Do you want to reopen error

  1. #1
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Excel file is already open-Do you want to reopen error

    Hello,

    I have put up some vba code where in user selects an excel file and data from the selected file is imported to current excel file. But the problem is when the file selected is already opened with user, my code fails. Can you please help how to handle this.

    Please Login or Register  to view this content.
    Thanks,
    Stay Safe
    Last edited by laxminarayana; 05-17-2020 at 03:03 PM.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Excel file is already open-Do you want to reopen error

    Hi there,


    But the problem is when the file selected is already opened with user, my code fails

    Sorry, but your code as posted will always fail - it contains several errors (e.g. what's a "workook"?)


    See if the following code does what you need:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Last edited by Greg M; 05-17-2020 at 04:39 PM. Reason: Typo corrected

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Excel file is already open-Do you want to reopen error

    Hi again,

    If you want to copy and paste even though the source workbook is already open you can use:

    Please Login or Register  to view this content.

    Hope this helps.

    Regards,

    Greg M

  4. #4
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: Excel file is already open-Do you want to reopen error

    Thank You very much Greg. This noob has long way to go

+ 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. Close and Reopen XLAM file within all open Excel windows
    By TrueFangz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2018, 04:15 PM
  2. My Excel SQL connection won't refresh after I close and reopen file
    By Cristian888 in forum Access Tables & Databases
    Replies: 7
    Last Post: 03-29-2017, 08:43 AM
  3. [SOLVED] Excel Hyperlink to open pdf- Error - "No program is registered to open this file
    By laxminarayana in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-27-2016, 10:03 AM
  4. [SOLVED] Open File, Load Picture and on reopen (Initialize) the picture loads.
    By jquintana83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2014, 12:05 PM
  5. Not to hide the columns every time when i reopen the excel file
    By ClaraTan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2014, 06:07 AM
  6. All VB windows open when I reopen excel file
    By jgema in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2013, 09:38 AM
  7. error after selecting other tab in excel userform and reopen the tab with web component
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2013, 04:28 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