use print in 2 workbooks

  • Thread starter Thread starter Bilal
  • Start date Start date
B

Bilal

Hi All,

I have 2 linked workbooks, workbook1, workbook2. I am
changing the data on book1, in book 2 its only a formula
and a form that I need to print.

I have a lot of books that its so annoying to return the
formula book each time to print the output.

so, is there a VBA or even function that I can add a print
icon on the first book which will print directly the 2nd
one ?

Thanks a lot.
 
Hi
if your second workbook is open you could use the following code:

sub print_second_book()
dim wbk as workbook
dim wks as worksheet
set wbk=workbooks("formula.xls")
set wks=wbk.worksheets("your_sheet")
wks.printout
end sub

Assign this macro to a button
 
Hi,

thanks for the help, but still one problem I couldn't
solve, I don't have a good knowledge of VBA and macros.

I managed to have this macro work on button on the toolbar
but actually I am trying to fix this macro to a
commanbutton that I will put inside the sheet !

appreciates your help
 
Back
Top