+ Reply to Thread
Results 1 to 2 of 2

Activating workbook without naming it specifically

  1. #1
    Patrick Young
    Guest

    Activating workbook without naming it specifically

    I have a master budget workbook from which I am copying different ranges
    from different worksheets to the corresponding ranges and worksheets in
    identically built branch budget workbooks. I want to do this automatically
    for each of the 20 Branch Budget Workbooks, without having to enter the
    names of the Branch Budget Workbooks each time to open them, and keep them
    activated until the steps 1 and 2 below are completed for each branch. How
    do I code this?

    The steps are as follows:-

    1.
    Open Master Budget Workbook

    2.
    Select Worksheet, Range and Copy
    Open Branch Budget Workbook 1
    Select Worksheet, Range and Paste

    3.
    Activate Master Budget Workbook
    Select Worksheet, Range and Copy
    Activate Branch Budget Workbook 1
    Select Worksheet, Range and Paste
    Close and save Branch Budget Workbook 1

    4.
    Activate Master Budget Workbook
    Repeat steps 2 and 3 for each of the remaining 19 Branch Budget Workbooks

    5.
    Close Master Budget Workbook

    Thanks for your help,


    Patrick



  2. #2
    Gareth
    Guest

    Re: Activating workbook without naming it specifically

    To get your code for just one iteration you should record a macro as you
    perform the task manually.

    Then, to iterate, you need to come up with some way of telling Excel
    what files to open, either by telling it to take all the files from a
    particular directory (maybe with a wildcard filter too), hardcode the
    actual filenames or maybe only those workbooks with a certain value in
    the Workbook properties.

    If you post the code you have so far that would help.

    Patrick Young wrote:
    > I have a master budget workbook from which I am copying different ranges
    > from different worksheets to the corresponding ranges and worksheets in
    > identically built branch budget workbooks. I want to do this automatically
    > for each of the 20 Branch Budget Workbooks, without having to enter the
    > names of the Branch Budget Workbooks each time to open them, and keep them
    > activated until the steps 1 and 2 below are completed for each branch. How
    > do I code this?
    >
    > The steps are as follows:-
    >
    > 1.
    > Open Master Budget Workbook
    >
    > 2.
    > Select Worksheet, Range and Copy
    > Open Branch Budget Workbook 1
    > Select Worksheet, Range and Paste
    >
    > 3.
    > Activate Master Budget Workbook
    > Select Worksheet, Range and Copy
    > Activate Branch Budget Workbook 1
    > Select Worksheet, Range and Paste
    > Close and save Branch Budget Workbook 1
    >
    > 4.
    > Activate Master Budget Workbook
    > Repeat steps 2 and 3 for each of the remaining 19 Branch Budget Workbooks
    >
    > 5.
    > Close Master Budget Workbook
    >
    > Thanks for your help,
    >
    >
    > Patrick
    >
    >


+ 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