Linking To An Unknown Filename

  • Hi,

    My problem is that I am trying to automate a few workbooks that relate to a business account.

    In my situation, the names of the workbooks where the information is contained (the info that I want to retrieve) changes every month (i.e the folder which they are kept in gets copied and then renamed) from something like Nov 06 to Dec 06.

    Is there any way the user can select which month, in VBA or in a list, and then this opens a file, which subsequently pulls out some data, copies it, and then puts it where i want it.

    Thanks in advance


  • Re: Linking To An Unknown Filename

    Yes, there probably is a way to do this. You'd set the the path with a partial variable referencing the unknown directory.

    But I'm not sure if that's what you want to do.

    Let me ask you this: Are you trying to do this because you have formulas in this workbook, and you want them updated to reflect the changes from the other workbook being moved (or a new workbook with a similar set-up that is referenced), which is created in a different directory?

    If that's the case, from the Menu, you'd go to Edit - Links - and then update your links to the new workbook.

    That would be once a month, compared to constantly being asked what directory you want to access every time you open the workbook.

  • Re: Linking To An Unknown Filename

    This would change all the links for one reference with a different folder-name (with the initial folder-name referenced in Cell A1 of the active sheet, which you could then use a Data Validation drop-down box) to that of another (with the new one referenced in cell A2). The paths and file names would obviously need to be modified.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!