• Info on xldialogs (O2000SR1)

    Author
    Topic
    #362363

    I’ve always been disappointed by the sparse information on xldialogs in excel help. Nor have I seen them detailed anywhere in the many books I have. Where can I find details on using the xldialogs, for example, details on all the parameters and what they do. Even just a description of the xldialog function would be nice.

    Viewing 0 reply threads
    Author
    Replies
    • #550075

      This is what I find when I search for Dialog Object in my XL 2000 Help. Is this what you are looking for?

      Represents a built-in Microsoft Excel dialog box. The Dialog object is a member of the Dialogs collection. The Dialogs collection contains all the built-in dialog boxes in Microsoft Excel. You cannot create a new built-in dialog box or add one to the collection. The only useful thing you can do with a Dialog object is use it with the Show method to display the corresponding dialog box.

      Using the Dialog Object

      Use Dialogs(index), where index is a built-in constant identifying the dialog box, to return a single Dialog object. The following example runs the built-in Open dialog box (File menu). The Show method returns True if Microsoft Excel successfully opens a file; it returns False if the user cancels the dialog box.

      dlgAnswer = Application.Dialogs(xlDialogOpen).ShowThe Microsoft Excel Visual Basic object library includes built-in constants for many of the built-in dialog boxes. Each constant is formed from the prefix “xlDialog” followed by the name of the dialog box. For example, the Apply Names dialog box constant is xlDialogApplyNames, and the Find File dialog box constant is xlDialogFindFile. These constants are members of the XlBuiltinDialog enumerated type. For more information about the available constants, see Built-in Dialog Box Argument Lists.

      • #550081

        I can find the built in dialog box list of arguments easily enough, it’s just that some of the argument names don’t relate very well to there function.
        Ewan

        • #550083

          I’m not sure what you are asking. What arguments are you looking for?

          • #550100

            As an example, I wanted to use the file open dialog, and thought perhaps if I set the parameter to read-only to true, it might not trigger the open macro so I wouldn’t get an unwanted form displayed. But this dialog has a dozen parameters, many of them obscure in what they do, and it just seemed like I was missing the “manual” for using the dialog. Is there a way, for example, to open a workbook and, in effect, say “no” to enable macros? That would shut down the unwanted open macro, but allow me to import the data.

            • #550112

              I have just done some testing, and I found that the Help file for XL 2000 is apparently incorrect. The Open Event routine will be executed when the file is opened from VBA code, even thought the Help file seems to indicate that it will not. However, the code below should keep the event routine from executing:

              Dim oWB As Workbook
                  Application.EnableEvents = False
                  Set oWB = Workbooks.Open(Filename:="C:WorkAOTest.xls")
                  Application.EnableEvents = True
              

              Is that what you are looking for?

            • #550162

              > I’ve always been disappointed by the sparse information on xldialogs in excel help

              sparse help is an understatement! With only the Show method and no documentation for the meaning of the arguments, Microsoft seems determined to irritate us. Just keep telling yourself, “If the job was easy, everyone would do it.”

              However, I think that XL object model for the xlDialog modules is still back in the Excel 4.0 days. This may mean that the old documentation has useful information. Try downloading ">xlmacr8.hlp. Each of the xlDialogXXX dialog boxes coresponds to the Excel 4 macro command XXX, so I am told that you can look up help for the macro command and find documentation for the parameters.

              As you can tell, I’ve not tried this. If you do, please reply back as to the quality, quantity, and usefulness of the documentation. Thanks! –Sam

            • #550177

              thanks, Sam.
              The information is very detailed and exactly what I need to know. The only problem is that it doesn’t exactly fit with the more modern dialogs, but it will certainly help me figure it out better than just a list of the parameters. I’ll bet the Microsoft has this help file developed somewhere for Excel 2000 and just has neglected to put it in the product or in the support databases.

    Viewing 0 reply threads
    Reply To: Info on xldialogs (O2000SR1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: