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!
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!