+ Reply to Thread
Results 1 to 4 of 4

use "search" in a closed workbook

  1. #1
    Registered User
    Join Date
    05-14-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    use "search" in a closed workbook

    Hi,

    I created a code to return value of a destinated cell from a list of closed workbooks in a folder. Now my question is how do I alternate the code to "search" through to return a destinated value? The difference is that for the current solution, I must know my destinated cell ahead of time, when in reality, I don't know where it is due to differences in different excel sheets.

    Thank you for your help. - Amy

    Please Login or Register  to view this content.
    Last edited by amy_cmte; 05-15-2009 at 01:35 PM. Reason: wrong location

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: use "search" in a closed workbook

    Welcome to the forum, amy.

    Please take a few minutes to read the forum rules (link in menu bar), and then edit your post to add code tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-31-2004
    Location
    Toronto, Canada
    MS-Off Ver
    2003/2007
    Posts
    36

    Re: use "search" in a closed workbook

    Hi Amy,
    I am sorry but I am not sure exactly what you are trying to achieve. I am just replying based on your subject of the thread.

    Now I am not sure if it's possible to search through closed workbooks. but you can open files in hidden mode. I am using the following in AutoCAD but it might help you here. The code basically creates a new 'Excel' instance and opens an excel file but it's hidden until it's made visible.

    Hope this helps.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-14-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: use "search" in a closed workbook

    Thanks Keyur for your reply.

    Opening and closing the file will take more time and effort because you must locate each excel file ahead of time in the code (and I have a lot of files to search through). I was able to use the code(not posted) to perform the same procedures to all the excel files in a certain located folder.

    In the function(posted in the original thread), is a function called GetInfoFromClosedFile. This function now only retrieves a certain cell from the closed workbook(not known ahead of time). I'm having difficulties adding a "search" feature in the function. (I'm not even sure if this is even feasible or not.) What I essentially want to achieve is to search the rows(in closed file), then find and copy the row with a value (i.e. Account Payable) to the new workbook.

    I hope I explain it better. Thanks again for your help.

+ 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