Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I print multiple charts on one page? smorgs87 Charts and Charting in Excel 3 April 22nd 23 04:08 AM
Update same charts in multiple sheets at once Div[_2_] Excel Worksheet Functions 1 January 28th 09 08:10 PM
How can I update multiple excel charts at the same time? emsy85 Charts and Charting in Excel 4 June 5th 08 03:47 PM
VBA to update Chart Source Data Rage on Multiple Charts MikeZz Excel Programming 1 February 6th 07 06:15 PM
Help! How to print multiple charts on the same page Boon8888 Excel Discussion (Misc queries) 1 February 23rd 06 06:54 PM


All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"