Results 1 to 2 of 2

Thread: Importing dynamic worksheets from another workbook
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    May 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Importing dynamic worksheets from another workbook

    Good morning everyone. Have a question.. Hope someone can help. I have a history with programming in QBASIC, but VB is... a different ballgame.

    Here's what I'm trying to do at present. I am trying to marry several different workbooks for my work into one very powerful and highly automated workbook. So far it has been pretty successful but now I'm stumped.

    What I need to accomplish:

    I have two workbooks. One of them generates material usage projections (I'll call it "Projections"), and the other is essentially a ledger of balance, receipts, usae, ending balance - I'll call it "Planner." I want to keep these workbooks separate for now, but import data (via queries & conectins) from the Projections into the Planner.

    (Once I get stuff imported, I think I can write simple scripts to interact with the data myself.)

    So, I need a script (preferably with comments from the author - I'd really like to learn) that:

    Checks the Projection workbook vs Planning workbook and reacts accordingly:
    The tabs I need to import from Projections are identified by "Week of (whatever date - it is in MM-DD format)". There are generally 2-3 tabs like this in Projections.
    --A. Is there any 'expired' data? For example if the script has previously imported "Week of 05-13" from Projections into Planning but that tab is no longer in Projections, close out the connection and delete the worksheet from Planning.
    --B. Is there any 'new' data? If I have previously imported "Week of 05-20" but the Projections workbook now contains data for "Week of 05-27", create a new data connection/import that worksheet from Projections into Planning, with the worksheet in Planning having the same name ("Week of 05-27" in this case).

    I've written a few other simple scripts for the Planning sheet but this one is different due to the dynamic nature of this operation.. and I'm a little stuck.

    Thanks in advance..

  2. #2
    New Member
    Join Date
    May 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Importing dynamic worksheets from another workbook

    And to clarify... I just essentially want the Planning sheet to have an imported copy of whatever "Week of MM-DD" tabs are in Projections. When old data drops out of Projections, it drops out of Planning too - when new data arrives, import it in. I hope this makes sense..

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •