Results 1 to 7 of 7
  1. #1
    Lounger
    Join Date
    Dec 2000
    Location
    Giessen, Noord-Brabant, Netherlands
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to display the Find dialog in VBA

    Hello.

    Can anyone tell me how to display the Excel2k Find (or Replace) dialog using VBA? I expected to be able to use:

    Application.Dialogs(xlDialogFind).Show

    but it seems that constant doesn't exist. Now what?
    Many thanks,
    Robin

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to display the Find dialog in VBA

    I can't find it myself, much to my surprise.

    The Word equivalent is wdDialogFileFind, but I can't find the Excel equivalent.

    Now what? Build your own userdialog I guess- unless it's hiding under a different name.

    I've been less than impressed with using some of the built-in dialog boxes myself, and have had to build my own just because of bugs and the inability to communicate with some values as documented.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    Lounger
    Join Date
    Dec 2000
    Location
    Giessen, Noord-Brabant, Netherlands
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to display the Find dialog in VBA

    OK Geoff, thanks for the advice. All the same, you'd think there would be *some* way to reproduce the effect of a simple click on the 'binoculars' button, using VBA. Hmm..

  4. #4
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Massachusetts
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to display the Find dialog in VBA

    Application.Dialogs(xlDialogFormulaFind).Show

    or

    Application.Dialogs(xlDialogFormulaReplace).Show

    Which I got from this handy list: Built-In Dialog Box Argument Lists

  5. #5
    Lounger
    Join Date
    Dec 2000
    Location
    Giessen, Noord-Brabant, Netherlands
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to display the Find dialog in VBA

    Thanks very much James.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to display the Find dialog in VBA

    It takes Microsoft to be so counter-intuitive.

    Make sure that all named arguments work as documented before depending on it.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  7. #7
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Massachusetts
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to display the Find dialog in VBA

    [img]/w3timages/icons/laugh.gif[/img] yep, they are the best [img]/w3timages/icons/laugh.gif[/img]

Posting Permissions

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