Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel print code modification
I need to somehow change the below code so that it only prints data
that is visible after it's filtered on the data sheet. Is this possible? Public Const APPNAME As String = "Elephants R Us" Option Explicit Sub PrintForms() Dim StartRow As Integer Dim EndRow As Integer Dim Msg As String Dim i As Integer Sheets("Form").Activate StartRow = Range("StartRow") EndRow = Range("EndRow") If StartRow EndRow Then Msg = "ERROR" & vbCrLf & "The starting row must be less than the ending row!" MsgBox Msg, vbCritical, APPNAME End If For i = StartRow To EndRow Range("RowIndex") = i If Range("Preview") Then ActiveSheet.PrintPreview Else ActiveSheet.PrintOut End If Next i End Sub Sub EditData() Worksheets("Data").Activate Range("A1").Select End Sub Sub ReturnToForm() Worksheets("Form").Activate Range("RowIndex").Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code modification help | Excel Worksheet Functions | |||
Code modification please | Excel Programming | |||
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) | Excel Programming | |||
modification for the code | Excel Programming | |||
Code modification to accomodate scaling and print areas. | Excel Programming |