+ Reply to Thread
Results 1 to 6 of 6

Pull data from closed workbook issue

  1. #1
    Forum Contributor
    Join Date
    08-07-2013
    Location
    mo
    MS-Off Ver
    Excel 2010
    Posts
    453

    Pull data from closed workbook issue

    I am trying to open a closed workbook through a macro at work. The issue is that when you open the workbook I have the following box pop up:

    This report should be opened as read-only unless you need to save changes to it. Open as read only?

    and I need to select yes.

    How can I do that?

    Here is my code so far:

    HTML Code: 

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Pull data from closed workbook issue

    You may provide the ReadOnly parameter:
    Please Login or Register  to view this content.
    Note that opening a workbook will usually make it active and I guessed that you did not want to change the value in the read-only workbook.
    Last edited by Izandol; 01-14-2014 at 08:47 AM.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: Pull data from closed workbook issue

    Well, you could tell it on the Workbooks.Open ...

    Please Login or Register  to view this content.

    and/or, you could try using

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    08-07-2013
    Location
    mo
    MS-Off Ver
    Excel 2010
    Posts
    453

    Re: Pull data from closed workbook issue

    Thank you both. I am still getting the error:

    Run-time '1004'
    Method 'open' of object 'workbooks' failed

    and is highlighting
    HTML Code: 

  5. #5
    Forum Contributor
    Join Date
    08-07-2013
    Location
    mo
    MS-Off Ver
    Excel 2010
    Posts
    453

    Re: Pull data from closed workbook issue

    I got it figured out. Thanks

    HTML Code: 

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: Pull data from closed workbook issue

    Why does it need the corrupt load parameter?

+ 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] VBA pull data from closed workbook depends upon header status !!! need help of experts
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-12-2013, 07:06 AM
  2. excel userform pull data from closed workbook
    By thameem127 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-23-2013, 01:53 PM
  3. Use VBA to pull data from another closed workbook
    By derryt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2012, 11:09 AM
  4. Data from closed workbook - issue referring to directory
    By CJ944 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-01-2011, 12:20 PM
  5. [SOLVED] Using ADO to pull data from closed workbook.
    By abhay_547 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2010, 06:20 PM

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