Private Sub Form_Load()
    CommonDialog1.ShowPrinter
    If CommonDialog1.CancelError = False Then
        MsgBox "a"
    Else
        MsgBox "b"
    End If
End Sub试一下就知道了