VBA printing challenges

mrpwagner

New Member
Joined
Jul 17, 2016
Messages
22
I am new to VBA. I have been researching on the internet and can't find answers to my questions. I look for ward to assistance.

I need to print two worksheets and two ranges (fixed - not dynamic) from two OTHER worksheets.

I have gotten parts of it to work but I am not able to combine them.

PRINTING THE SHEETS:

Private Sub CommandButton1_Click()


Sheets(Array("2016.08 Printout", "2016.08 Calculations")).Select




Sheets(Array("2016.08 Printout", "2016.08 Calculations")).PrintOut





End Sub

THE ABOVE WORKS

PRINTING ONE OF THE RANGES

Sub Macro2()
'
' Macro2 Macro
'


'
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("Assignments").Select
Range("C744:O758").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
End Sub



THIS WORKS INDEPENDENTLY AS WELL

Copied the above to another macro and changed the parameters:

Sub Macro3()
'
' Macro3 Macro
'


'
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("Unavailability").Select
Range("C794:BB820").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
End Sub





THIS DOES NOT PRINT THE SELECTED RANGE!


Ideally the macro would print the two worksheets (2016 Printout and 2016 Calculations and the specific ranges from the assignments and unavailability worksheets.


Please speak to me as if I know nothing about VBA - as that would be the case.



I appreciate your help in advance.

Thank you!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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
Back
Top