VBA: Print several excel sheets inside of only one *.tiff image

das_thunder

New Member
Joined
Apr 16, 2009
Messages
1
Hi there!

I've got an issue:

I have a vba code in excel to print some stuff as an *.tiff image. I have to print from 3 different sheets (on the same file) on excel . Nowadays with this code I print each sheet of excel as each different *.tiff image.. this is, 3 excel sheets returns 3 *.tiff images. But *.tiff images have the particularity to join several sheets on only one image (it ends as if it was a *.pdf file).
- So how can I change my code so that I've got the 3 sheets on the excel file but it will only return one *.tiff file with the 3 sheets inside of it?

By the way just to say that the *.tiff printer is a virtual printer!

I appreciate any help!

Here's my actual code:

Sub imprime_folha_emb()
Sheets("Expedição_Fl.1").Select
Range("A1:M75").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$M$75"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True


Sheets("Expedição_Fl.2").Select
Range("A1:M57").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$M$57"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True


Sheets("Cálculo_3").Select
Range("N94").Select
If Range("N94").Value > 19 Then
Sheets("Expedição_Fl.2").Select
Range("A58:M114").Select
ActiveSheet.PageSetup.PrintArea = "$A$58:$M$114"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

End If

Sheets("Cálculo_3").Select
Range("N94").Select
If Range("N94").Value > 39 Then
Sheets("Expedição_Fl.2").Select
Range("N1:Z57").Select
ActiveSheet.PageSetup.PrintArea = "$N$1:$Z$57"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

End If

Sheets("Cálculo_3").Select
Range("N94").Select
If Range("N94").Value > 59 Then
Sheets("Expedição_Fl.2").Select
Range("N58:Z114").Select
ActiveSheet.PageSetup.PrintArea = "$N$58:$Z$114"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

End If

Sheets("Expedição_Fl.3").Select
Range("A1:L74").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$L$74"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

ActiveWindow.SelectedSheets.PrintPreview


Sheets("Cálculo_1").Select
End Sub
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Watch MrExcel Video

Forum statistics

Threads
1,122,686
Messages
5,597,536
Members
414,153
Latest member
SandraC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top