Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following command shows the Find Dialog box but how do I capture
the results of that search. Application.Dialogs(xlDialogFormulaFind).Show If I try set stuff = Application.Dialogs(xlDialogFormulaFind).Show I get an error. If I try stuff = Application.Dialogs(xlDialogFormulaFind).Show I get true or false. I'd like to find the cell that has the data and then capture that cells attributes, ie address, row, column, etc. Where can I find examples of using the results of what the dialog box found. Help shows what attributes to feed the boxes but I can't find where to capture the results of the search. Thanks for any help. Don |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't think you can use that dialog that way.
Maybe you could build your own find? Option Explicit Sub testme01() Dim WhatToFind As String Dim FoundCell As Range WhatToFind = Inputbox(Prompt:="What:") if whattofind = "" then exit sub end if 'you can even limit your range With ActiveSheet.Range("a1:b99") 'or all the cells 'With ActiveSheet.cells Set FoundCell = .Cells.Find(What:=WhatToFind, _ After:=.Cells(.Cells.Count), _ LookIn:=xlValues, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If FoundCell Is Nothing Then Msgbox "Not found" Else Msgbox Foundcell.address & vblf & _ foundcell.row & vblf & foundcell.column End If End With End Sub You'll want to specify the parms in the .Find() command, too. Record a macro when you use the settings you want and you'll see the code you need. don wrote: The following command shows the Find Dialog box but how do I capture the results of that search. Application.Dialogs(xlDialogFormulaFind).Show If I try set stuff = Application.Dialogs(xlDialogFormulaFind).Show I get an error. If I try stuff = Application.Dialogs(xlDialogFormulaFind).Show I get true or false. I'd like to find the cell that has the data and then capture that cells attributes, ie address, row, column, etc. Where can I find examples of using the results of what the dialog box found. Help shows what attributes to feed the boxes but I can't find where to capture the results of the search. Thanks for any help. Don -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
xldialog question | Excel Programming | |||
Value From xlDialog | Excel Programming | |||
Append code to a xlDialog | Excel Programming | |||
XLDialog Printer Setup | Excel Programming | |||
xldialog | Excel Programming |