+ Reply to Thread
Results 1 to 3 of 3

Open and read closed workbook

  1. #1
    Registered User
    Join Date
    02-17-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    6

    Open and read closed workbook

    I have a workbook and I need to loop all rows in a closed workbook.
    What is the correct way to write the macro?

    I have a UserForm where I select the workbook, so I know the path to it.
    It is the first sheet I need to read. (unknown sheetname, not Sheet1)
    And the columns I have to read is A and B until the first empty row.

    Links for tutorials for this, or anything else would help me since I'm new to VBA.

    Thanks for any help with this.

  2. #2
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481

    Re: Open and read closed workbook

    Does the workbook need to stay closed or can you open it, read what you want into your current workbook and then close the one you are reading out of.
    If it is OK to open then close the workbook then I would suggest recording a macro and doing this to get you started.

    You can then add a For - Next loop or a Do Loop to get the information you want transfered to your workbook.

  3. #3
    Registered User
    Join Date
    02-17-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Open and read closed workbook

    I would prefer to loop a closed workbook without opening it, but I do not know how.
    But maybe that is impossible?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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