upHook = lHookAddress(AddressOf PrintSetupHookProc)
        Else
            'pd.flags = pd.flags Or PD_ENABLEPRINTHOOK
            'pd.lpfnPrintHook = lHookAddress(AddressOf PrintHookProc)
        End If
    End If
    
    ' Show Print dialog
    m_lApiReturn = PrintDlg(pd)
    'ClearHookedDialog
    Set m_oEventSink = Nothing
    Select Case m_lApiReturn
    Case 1
        VBPrintDlg = True
        ' Return dialog values in parameters
        hdc = pd.hdc
        If (pd.flags And PD_PAGENUMS) Then
      