Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to be able to click on a command button and have it pop up a
search window to type into to locate text or numbers??? I have been told that it is impossible, but I think it can be done. Please help. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Commandbutton1_Click()
application.Dialogs(xlDialogFormulaFind).show End Sub may be what you want. -- Regards, Tom Ogilvy "Fred" wrote in message ... I would like to be able to click on a command button and have it pop up a search window to type into to locate text or numbers??? I have been told that it is impossible, but I think it can be done. Please help. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you!! Works great!!
"Tom Ogilvy" wrote: Private Sub Commandbutton1_Click() application.Dialogs(xlDialogFormulaFind).show End Sub may be what you want. -- Regards, Tom Ogilvy "Fred" wrote in message ... I would like to be able to click on a command button and have it pop up a search window to type into to locate text or numbers??? I have been told that it is impossible, but I think it can be done. Please help. Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom Ogilvy wrote
Private Sub Commandbutton1_Click() application.Dialogs(xlDialogFormulaFind).show End Sub Questions: 1. Is the button from the Forms or Control Toolbox? 2. How to assign a Private Sub()? 3. Will it actually find anything without a range selected? -- David |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
1)
in the example, it is the click event for a commandbutton from the control toolbox toolbar. The commandbutton's name is Commandbutton1. 2) this question is meaningless in this context. Since it is an event of the commandbutton, it is already linked to that button. For buttons from the forms toolbar, you would just type in the macro name in the assignment box, even though it can't be selected from the list. Such code should be in a general module in that case. 3) It will search within the area selected when the button is pressed. This behavior is different from what is expected if only one cell is selected. If a specific area is to be searched, it could be set as part of the code. Private Sub Commandbutton1_Click() Cells.Select Application.Dialogs(xlDialogFormulaFind).Show End Sub -- Regards, Tom Ogilvy "David" wrote in message ... Tom Ogilvy wrote Private Sub Commandbutton1_Click() application.Dialogs(xlDialogFormulaFind).show End Sub Questions: 1. Is the button from the Forms or Control Toolbox? 2. How to assign a Private Sub()? 3. Will it actually find anything without a range selected? -- David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA code for search button | Excel Worksheet Functions | |||
how to make search button in the first sheet | Excel Discussion (Misc queries) | |||
Search Button | Excel Discussion (Misc queries) | |||
Search Box & Button for Workbook | Excel Programming | |||
Command button to search column | Excel Programming |