Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dialog Box Controls (XL97:SR2)

    Can someone direct me to a resource regarding the controls for Dialog Boxes.

    I'm using "Application.Dialogs(xlDialogPrinterSetup).Sho w" and am not sure on how to test if the "Ok" or "Canel" button is pressed.

    Thanks,
    John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Dialog Box Controls (XL97:SR2)

    The online help for the Dialog object should provide the necessary information. The Show method returns True if the user clicked OK, and False if the user clicked Cancel. The online help also provides a list of arguments for built-in dialogs, although this information is very terse. For xlDialogPrinterSetup it only mentions 'printer_text'.

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dialog Box Controls (XL97:SR2)

    Hans,

    Thanks for the response. I have incorporated your suggestions in my code and have looked at the list of arguments for the built-in dialogs for additional help. I'm still puzzeled as how these arguments can be used to change the dialog box. I have no reference or example to follow which would move me forward. Your description of the list of arguments. "Very Terse" truly sums this up.

    What would be the code to select a specific printer from the list shown in the following code. Say in my example that there are five printers in the list, how does one select the third printer by code?

    tmp = Application.Dialogs(xlDialogPrinterSetup).Show
    If tmp = True Then
    Run some code
    Else
    End
    End If

    Thanks,
    John

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Dialog Box Controls (XL97:SR2)

    The purpose of the dialog box is for the USER to select the printer. If you want to choose a printer, just set the activeprinter:

    Application.ActivePrinter = "morrspMOR8PB on Ne00:"
    no need for dialog box.<post#=280743>post 280743</post#> has code to get the available printers.

    Steve

Posting Permissions

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