+ Reply to Thread
Results 1 to 3 of 3

VBA to Refresh and PDF

  1. #1
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    VBA to Refresh and PDF

    I'm working on a project that involves refreshing a Template report and PDF'ing it to a folder.

    I have 3 different tabs:
    Tab 1) Template
    Tab 2) Data
    Tab 3) Company Names

    Tab 1 is a report that has formulas that all refresh when one cell is changed, which is the "Company Name".

    Tab 2 is the raw data that is used to update the Template once the "Company Name" in the first page is entered.

    Tab 3 is a list of all of the unique "Company Names" that are individually entered into the 1st tab to create a unique report for each company name

    I'm trying to create a macro that loops through a column of company names in tab 3 bringing in each name one at a time, placing it in the "Company Name" cell, refreshing the report/worksheet, and then PDF'ing it to a specified folder. The loop would in turn do this for each company name listed in tab 3.

    Please help!!
    Michael

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: VBA to Refresh and PDF

    Better to send a sample. Try recording a macro and walk it through one iteration. Then code a loop around it with the row as variable incrementing until there are no more companies..

  3. #3
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: VBA to Refresh and PDF

    Attached is the spreadsheet. Normally there are formulas in all of the cells in the "Template Report" sheet that are pulling from a tab called "Data" but I left it off since it's really not needed to build the macro. Essentially I just need to create a loop that pulls from the "Company Name" tab one at a time and puts that value in cell C5 of the Report Template sheet, creates a PDF using the Company Name in the name of the PDF being saved. Then loop through all of the company names until reaching the end.
    Attached Files Attached Files

+ 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. Macro to refresh Essbase data sets, display refresh date?
    By nellaneb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2014, 03:59 PM
  2. Replies: 2
    Last Post: 09-29-2013, 06:15 AM
  3. Replies: 1
    Last Post: 09-28-2013, 07:11 PM
  4. [SOLVED] Using VBA to change a pivot table filter, refresh the report and set up a refresh delay
    By Bonnister in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-18-2012, 10:43 AM
  5. Enable Auto Refresh - Wait for refresh to sinish before running a macro
    By tomlancaster in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2011, 11:52 AM

Tags for this Thread

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