iouu2
New Member
- Joined
- Apr 15, 2011
- Messages
- 14
Hi. I made a command button that will print off tabs within a workbook. However, I am trying to make it so that this excel file can be print-ready, meaning everything is easy to read and doesn't flow into 3 pages when it can be condensed into one? The problem I am having is I want to make it so that the entire workbook is print-ready without having radio buttons for each Tab. Is this possible?
Have a command button called PrintTabs
Have radio buttons for various tabs called Tab1, Tab2, Tab3, Tab4, etc.
The Value field of Tab1 button as true. As you click on any other radio button, the value will cycle through the different buttons.
Double click on the command button the below code is inserted:
Private Sub PrintTabs_Click()
If Tab1.Value = True Then
Sheets("Tab 1").PrintOut
ElseIf Tab2.Value = True Then
Sheets("Tab 2").PrintOut
End If
End Sub
This is the code I was thinking for to make it print-ready and fit nicely, but need help executing code.
Private Sub Print_Macro()
ActiveWindow.View = xlPageBreakPreview
ActiveSheet.ResetAllPageBreaks
With ActiveSheet.PageSetup
.FooterMargin = Application.InchesToPoints(0.45)
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftFooter = "&""SupportingEvidence"" & Chr(10)
.RightFooter = "Page: &P of &N "
.CenterFooter = "&R"
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
'.FirstPageNumber = xlAutomatic
'.Order = xlDownThenOver
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
ActiveWindow.View = xlNormalView
Range("A1").Select
End Sub
Have a command button called PrintTabs
Have radio buttons for various tabs called Tab1, Tab2, Tab3, Tab4, etc.
The Value field of Tab1 button as true. As you click on any other radio button, the value will cycle through the different buttons.
Double click on the command button the below code is inserted:
Private Sub PrintTabs_Click()
If Tab1.Value = True Then
Sheets("Tab 1").PrintOut
ElseIf Tab2.Value = True Then
Sheets("Tab 2").PrintOut
End If
End Sub
This is the code I was thinking for to make it print-ready and fit nicely, but need help executing code.
Private Sub Print_Macro()
ActiveWindow.View = xlPageBreakPreview
ActiveSheet.ResetAllPageBreaks
With ActiveSheet.PageSetup
.FooterMargin = Application.InchesToPoints(0.45)
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftFooter = "&""SupportingEvidence"" & Chr(10)
.RightFooter = "Page: &P of &N "
.CenterFooter = "&R"
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
'.FirstPageNumber = xlAutomatic
'.Order = xlDownThenOver
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
ActiveWindow.View = xlNormalView
Range("A1").Select
End Sub