Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Update Multiple Charts then Print to One PDF File
I have yearly data for multiple countries stored in an Access database. I
have an Excel chart template that I import the data into to view each country's yearly data as needed. I need a macro to import the data for multiple countries at one time, create an updated chart for each country, and then print all the country charts into one PDF file. Currently, I have a worksheet in my Excel workbook that I use to type which ever countries I want to view in separate charts based off of the template chart. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Update Multiple Charts then Print to One PDF File
Compu Geek;715770 Wrote: I have yearly data for multiple countries stored in an Access database. I have an Excel chart template that I import the data into to view each country's yearly data as needed. I need a macro to import the data for multiple countries at one time, create an updated chart for each country, and then print all the country charts into one PDF file. Currently, I have a worksheet in my Excel workbook that I use to type which ever countries I want to view in separate charts based off of the template chart. You could use the following as a starting point to have all your templates in one workbook - this is the only way I can think of to print to one pdf. (There are utilities available to combine several pdfs to one, though.) VBA Code: -------------------- Dim country(1 To 10) As String, i As Integer country(1) = "USA" ' define all the countries you need.... Workbooks.Add For i = 1 To UBound(country()) Sheets.Add Type:="your_template_name.xlt", Befo=Sheets(Sheets.Count) ActiveSheet.Name = country(i) ' here get the data in place for country(i) ' e.g. Range("country_name").Value = country(i) Range("data_set").QueryTable.Refresh Next -------------------- -- Zeq ------------------------------------------------------------------------ Zeq's Profile: http://www.thecodecage.com/forumz/member.php?u=1626 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=200375 http://www.thecodecage.com/forumz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I print multiple charts on one page? | Charts and Charting in Excel | |||
Update same charts in multiple sheets at once | Excel Worksheet Functions | |||
How can I update multiple excel charts at the same time? | Charts and Charting in Excel | |||
VBA to update Chart Source Data Rage on Multiple Charts | Excel Programming | |||
Help! How to print multiple charts on the same page | Excel Discussion (Misc queries) |