单面打印ActiveSheet

时间:2015-12-07 11:00:09

标签: excel excel-vba vba

我尝试打印ActiveSheet单面和双面。双面打印(Case Dubbelzijdig)和Case Concept工作正常。如何使Case Origineel打印ActiveSheet单面。哪些值传递给.PrintOut

Option Explicit
Private bActive As Boolean

Private Sub cmdOK_Click()
    Dim WordRange As Range

With ActiveSheet

    Select Case lstSelect

    Case "Concept"

        .ExportAsFixedFormat _
        Type:=xlTypePDF, _
        Quality:=xlQualityStandard, _
        IncludeDocProperties:=True, _
        IgnorePrintAreas:=False, _
        OpenAfterPublish:=True

    Case "Origineel"

        .PrintOut

    Case "Dubbelzijdig"

        .PrintOut , , , , ActivePrinter

    End Select
End With

Unload frmSelect
End Sub


Private Sub UserForm_Activate()
  While bActive
    DoEvents
  Wend

End Sub

Private Sub UserForm_Initialize()
  bActive = True
  With lstSelect
    .AddItem "Concept"
    .AddItem "Origineel"
    .AddItem "Dubbelzijdig"
    If .ListCount > 0 Then
      lstSelect = lstSelect.Column(0, 0)
    End If
  End With
End Sub

0 个答案:

没有答案