#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Print Macro Help

Hi,

I have created an Excel workbook that shows performance of a sales
force by the use of a graph and a drop down list (so that I don't need
to create a new worksheet for every employee). The drop down list is
in cell B5 and the worksheet is called 'Sales'.

I have been asked to create a print macro that will print out the
graph for each employee but I don't know how to go about creating a
print macro that can cycle through the drop down list and print off
the 7 performance graphs (for the 7 employees in the list).

I have previously hacked together a print macro way back in Excel 2000
which cycled through different worksheets printing each one in turn
but I have no idea how to go about printing different graphs sourced
from a single worksheet. Can anyone help?

DS
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Print Macro Help

If you created the dropdown using data|validation and a source range, you could
cycle through that range.

Dim myRng as range
dim myCell as range

set myrng = worksheets("SheetWithListNameHere").range("listnam ehere")

for each mycell in myrng.cells
worksheets("sheetwithdropdown").range("a1").value = mycell.value
application.calculate 'just to make sure
'print stuff here
next mycell

I'd record a macro when I printed what I wanted. Then I could merge it into
this shell.

You'll have to change the names of the worksheets (both of them) and the address
of the cell with the validation and the name of the list.



wrote:

Hi,

I have created an Excel workbook that shows performance of a sales
force by the use of a graph and a drop down list (so that I don't need
to create a new worksheet for every employee). The drop down list is
in cell B5 and the worksheet is called 'Sales'.

I have been asked to create a print macro that will print out the
graph for each employee but I don't know how to go about creating a
print macro that can cycle through the drop down list and print off
the 7 performance graphs (for the 7 employees in the list).

I have previously hacked together a print macro way back in Excel 2000
which cycled through different worksheets printing each one in turn
but I have no idea how to go about printing different graphs sourced
from a single worksheet. Can anyone help?

DS


--

Dave Peterson
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
print button macro & specific tabs to print Chuck[_3_] Excel Worksheet Functions 2 November 22nd 07 12:21 AM
need a print macro to print only a certain number of pages Tonso Excel Discussion (Misc queries) 2 July 26th 06 06:03 PM
Pivot Table macro to set print area and print details of drill down data Steve Haskins Excel Discussion (Misc queries) 2 December 28th 05 04:59 PM
Macro to open print window and set to print entire workbook retseort Excel Discussion (Misc queries) 1 October 27th 05 11:00 PM
Create a print macro that would automatically select print area? wastedwings Excel Worksheet Functions 7 August 22nd 05 10:36 PM


All times are GMT +1. The time now is 04:23 AM.

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

About Us

"It's about Microsoft Excel"