+ Reply to Thread
Results 1 to 3 of 3

SET WSD3 = to workbook just opened

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    Manitoba, Canada
    MS-Off Ver
    2010
    Posts
    28

    SET WSD3 = to workbook just opened

    I have written a macro which creates 4 pivot tables on 4 different worksheets. These sheets are in the same workbook as the macro so, I would like to change my code.
    I've created 4 different workbooks for each of my pivotables. I want to open a workbook "SET" a name to the workbook just opened to say WSD3
    Then, I can change the "destination" of my pivot table. I will need to add a worksheet in each workbook and name it based on the month in "A2" of my data sheet.
    i.e workbook "A" sheets sep,oct,nov....Aug workbook"B" Basically, I'm not sure how to modify the second set of code with the first set of code.


    Please Login or Register  to view this content.





    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    05-10-2013
    Location
    Manitoba, Canada
    MS-Off Ver
    2010
    Posts
    28

    Re: SET WSD3 = to workbook just opened

    I've revised my code as follows but it's still not working. The file is not opening and I'm not sure how to name the worksheet based on whats in cell A2 of my data worksheets. I think this is fairly basic but I'm just not getting it.

    Please Login or Register  to view this content.
    all help is appreciated

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: SET WSD3 = to workbook just opened

    Not sure if I have the right filename and worksheet name but you should get the idea of setting object refereneces.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Use a macro to extract cell data from opened workbook to new opened workbook
    By BrianTFC in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-26-2014, 01:35 PM
  2. Replies: 0
    Last Post: 04-26-2013, 03:40 AM
  3. Need to Copy Columns from Previous Workbook to Newly Opened Workbook
    By BYizz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-06-2012, 06:33 AM
  4. VBA button to store data from 1 workbook and paste it in another UN-opened workbook
    By mountaineerhughes in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-26-2012, 11:39 AM
  5. Replies: 2
    Last Post: 01-19-2006, 06:00 AM

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