Consulting

Results 1 to 2 of 2

Thread: xldialogprintersetup Problem

  1. #1
    VBAX Newbie
    Joined
    Dec 2004
    Location
    Hutchinson, MN
    Posts
    1
    Location

    xldialogprintersetup Problem

    I have the following code that displays the xldialogprintersetup window and makes the cancel button function correctly, however the setup button still does not function correctly. It displays the settings for the default printer not the printer chosen. Any help?

    Thanks

      
    Sub Select_Printer()
    Dim Test As String
    Dim CPrinter As String
    Dim ws As Worksheet
    Do Until CPrinter = Application.ActivePrinter
    CPrinter = Application.ActivePrinter
    Application.StatusBar = "Printer " & CPrinter & " Selected"
    Test = Application.Dialogs(xlDialogPrinterSetup).Show
        If Test = "False" Then
            Application.StatusBar = ""
            Exit Sub
        End If
    Loop
    If Test = "True" Then
         Sheets("Manure Source Info").Printout
    Sheets("Field Info").Printout
    Sheets("Sensitive Areas Management").Printout
    Sheets("High P Soil Management").Printout
    Sheets("Field Specific Land Application").Printout
    Response = MsgBox("To complete your Manure Management Plan please attach aerial photgraphs or maps the identify the fields scheduled to receive manure.  These aerial photographs or maps should identify all sensitive features within each field.  Also please attach a copy of the most recent manure nutrient analysis and all soil test data.")
    End If
    End Sub

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    That's the way the dialog works. You can change the active printer.
     Application.ActivePrinter = "Printer Name"

Posting Permissions

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