A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Automatically print linked documents



 
 
Thread Tools Display Modes
  #1  
Old September 23rd, 2004, 08:29 PM
EnglishTeacher
external usenet poster
 
Posts: n/a
Default Automatically print linked documents

How can I program a radio button or a check box to automatically print a
linked document.

In other words, if the radio button is selected, and I print the Excel
spreadsheet, I want it to automatically print the file that it is linked to.
But only if the radio button is selected. If the radio button is not
selected, I don't want it to print to the linked document.

Thanks
  #2  
Old September 25th, 2004, 04:11 PM
Bill Manville
external usenet poster
 
Posts: n/a
Default

EnglishTeacher wrote:
In other words, if the radio button is selected, and I print the Excel
spreadsheet, I want it to automatically print the file that it is linked to.
But only if the radio button is selected. If the radio button is not
selected, I don't want it to print to the linked document.


You will need to write a macro that gets executed when the worksheet is to be
printed.

The only suitable event is Workbook_BeforePrint which is called regardless of
the print options you have chosen (active sheet, whole workbook etc). Can I
assume that whenever you print anything in the workbook you want to take
account of the checkboxes?

Radio buttons are appropriate if you only ever select one of the linked files
to print - otherwise checkboxes are more suitable. Can I assume checkboxes?

You can't print a workbook without opening it. You won't be able to open the
workbook if there is a workbook with the same name. Can I assume that if there
is a workbook open with the same name then that is the one you want to print?

I want it to automatically print the file that it is linked to.

This sounds like the checkbox is linked to the file (ie the setting of the
checkbox comes from the linked file). Is that the case?
If not, how would we find the filename starting from the checkbox?

If you would care to answer these questions we could probably suggest some code
to do what you desire.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup

  #3  
Old September 27th, 2004, 03:51 PM
EnglishTeacher
external usenet poster
 
Posts: n/a
Default

Sorr, Bill for the delay in the response. I was away from my desk on a
three-day weekend starting last Friday.

In response to your questions:

1. Yes. Whevenever the main workbook is printed, it should and will take
account of the checkboxes

2. Yes, checkboxes will be better because there is likely to be multiple
other files that will be linked, opened and printed.

3. Yes, you can assume that if there is a workbook open with the same name
then that is the one you want to print.

4. Yes, the checkbox is linked to the file. Can you show me how to do that
as well?

Thanks.

"Bill Manville" wrote:

EnglishTeacher wrote:
In other words, if the radio button is selected, and I print the Excel
spreadsheet, I want it to automatically print the file that it is linked to.
But only if the radio button is selected. If the radio button is not
selected, I don't want it to print to the linked document.


You will need to write a macro that gets executed when the worksheet is to be
printed.

The only suitable event is Workbook_BeforePrint which is called regardless of
the print options you have chosen (active sheet, whole workbook etc). Can I
assume that whenever you print anything in the workbook you want to take
account of the checkboxes?

Radio buttons are appropriate if you only ever select one of the linked files
to print - otherwise checkboxes are more suitable. Can I assume checkboxes?

You can't print a workbook without opening it. You won't be able to open the
workbook if there is a workbook with the same name. Can I assume that if there
is a workbook open with the same name then that is the one you want to print?

I want it to automatically print the file that it is linked to.

This sounds like the checkbox is linked to the file (ie the setting of the
checkbox comes from the linked file). Is that the case?
If not, how would we find the filename starting from the checkbox?

If you would care to answer these questions we could probably suggest some code
to do what you desire.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT!! Should know how to do this, but I don't - or I can't remember Miss Perspicacia Tick Publisher 13 August 6th, 2004 05:12 PM
adding the path and filename to all documents automatically Pat Page Layout 1 August 5th, 2004 10:00 PM
Closing Linked Documents cydkil General Discussion 1 August 1st, 2004 05:50 AM
Page prints differently than shown in Print Preview Suzanne S. Barnhill Page Layout 0 July 22nd, 2004 03:42 PM


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


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