+ Reply to Thread
Results 1 to 6 of 6

Dedicated cell for search

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    132

    Dedicated cell for search

    I would like to have a cell or button on my worksheet which when "clicked" opens the search facility, is this possible?

    Thanks and regards

    Nigel

  2. #2
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    Hi Nigel,

    Yes, it's possible. I'm off to bed now but the below should help you...

    The critical line of code is:
    Application.Dialogs(xlDialogFormulaFind).Show
    and the implementation is discussed here:
    HTML Code: 
    Goodluck :-)
    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    You may find this link interesting

    http://www.excelforum.com/showthread.php?t=594168

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    132
    Many many thanks for the replies....plenty of options there for me.

    Thanks again for taking the time.

    Regards

    Nigel

  5. #5
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    132
    It works fine except the search box opened does not have all the functions as the "normal" find options in excel 2003. The option to check the whole workbook is missing which would be useful to me, is there some adjustment I can make to the code which will then bring up the fully functional search box?

    Thanks and regards

  6. #6
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    Hi Nigel,

    I would like to have a cell or button on my worksheet which when "clicked" opens the search facility, is this possible?
    Thanks and regards
    Nigel
    I hadn't even noticed that my initial suggestion of "Application.Dialogs(xlDialogFormulaFind).Show" only has limited functionality. However, your latest question made me wonder if we are trying to reinvent the wheel, so I re-read your first question - and I think we are...

    1) If you are already using the keyboard, I think the quickest way to show the Find dialogbox will always be to press:
    [ctrl + f]

    2) Another way (shown below*) puts a native Excel icon on a standard toolbar, but this may not be ideal b/c it is then specific to the user's setup when it is saved in their "toolbar file".
    *right click on a standard menu (eg "File") - Customise - Commands - select "Edit" in the Categories (LH options) - scroll through the Commands (RH column) until you see "Find..." - click & hold on this icon & drag it up onto one of your normal menus & then release the mouse.

    3) Option 2 could be automated for other users by including the below code in a "Workbook Open" macro (created with the macro recorder):
    (I'm not sure how to remove it on file close b/c ...".controls.delete" doesn't work for me)

    Application.CommandBars("Worksheet Menu Bar").Controls.Add Type:= _
            msoControlButton, ID:=1849, Before:=11
    4) Least preferred alternative due to the reported possibility of inconsistent results is the use of "sendkeys". NB: I can only make this work by having the below code activated from with in Excel and not within VBE (eg through a Worksheet_SelectionChange macro):
    Application.SendKeys "^f"
    hth
    Rob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1