Results 1 to 3 of 3

VB Code/Macro Printing with Page End pulled from Workbook

Threaded View

  1. #1
    Registered User
    Join Date
    10-29-2008
    Location
    Eastern US
    Posts
    2

    VB Code/Macro Printing with Page End pulled from Workbook

    This has been driving me up the wall all morning.

    I have a worksheet that changes in length. There is a formula that calculates how many pages the sheet will be.

    The also is a print button on the sheet that will print a coversheet "Sheets("Title")" and then it is supposed to print the data on the second sheet.

    Below the code I have so far... I know I am missing something, but knowing very little about macros I just can't seem to figure it out.

    Private Sub CommandButton1_Click()
        Application.Dialogs(xlDialogPrinterSetup).Show
        Application.ScreenUpdating = False
        Sheets("Title").Select
            ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
        Sheets("Report").Select
            .End = ActiveSheet.Range("B3").Value
            ActiveWindow.SelectedSheets.PrintOut From:=1, To:=.End
    End Sub
    Last edited by S1L1SC; 10-30-2008 at 12:12 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1