Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Double click to print active range

(Excel 97)
I have coded a print function that is activated on a double-click event.
When the user double clicks a named range (employee name), the code selects
a finite range and prints it. The problem is I have a lot of employees to
accommodate, and I would like to avoid writing an event for each one.

Is there a way to write the code to print the appropriate range (always
3 rows and 15 columns including the active cell) without having to code each
individual employee record? If so, I can use the same workbook in different
offices with varying numbers of employees without having to customize the
application for each location.

Thanks in advance!!

BW


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 301
Default Double click to print active range

You don't say if I double click cell F12, do I want to print A10:O12 or
A11:O13 or A12:O14. But this should get you started:

Range(target.row,1).resize(3,15).Printout

If your structure is 3 rows, skip a row, 3 rows, skip a row, etc, then you
could use:

Target.CurrentRegion.Resize(3,15).Printout.

HTH
Bob Umlas
Excel MVP

"Bob Wall" wrote in message
...
(Excel 97)
I have coded a print function that is activated on a double-click event.
When the user double clicks a named range (employee name), the code
selects a finite range and prints it. The problem is I have a lot of
employees to accommodate, and I would like to avoid writing an event for
each one.

Is there a way to write the code to print the appropriate range (always
3 rows and 15 columns including the active cell) without having to code
each individual employee record? If so, I can use the same workbook in
different offices with varying numbers of employees without having to
customize the application for each location.

Thanks in advance!!

BW



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 to change syperlink from single click to double click syperlinker Excel Worksheet Functions 0 June 13th 08 05:01 PM
double click lmb Excel Discussion (Misc queries) 4 September 6th 07 07:38 PM
Double click Anette Denmark Excel Discussion (Misc queries) 10 February 18th 07 04:24 PM
Click on graph bar to execute a double-click in a pivot table cell [email protected] Charts and Charting in Excel 4 August 3rd 05 01:37 AM
Before Double-Click Jim May Excel Discussion (Misc queries) 2 December 18th 04 05:52 PM


All times are GMT +1. The time now is 06:02 AM.

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"