ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using an input box to search for a value ... (https://www.excelbanter.com/excel-programming/331423-using-input-box-search-value.html)

Steve Tate

Using an input box to search for a value ...
 
Hi,

Wondering if someone can help me please.

I would like to have a command button on my sheet that when clicked
opens up a user input box.

The user then enters a numeric value and I would like this value to be
found on the worksheet i.e search for the value within column A or
range A1 to A65536.

If the value is found within the range then I need to activate the cell
otherwise if the value is not found then I would like a message box to
appear saying the value was not found and then show the input box
again.

Any advice on how to do this please?

Many thanks for your time.

Steve.


Robert Bruce[_2_]

Using an input box to search for a value ...
 
Roedd <<Steve Tate wedi ysgrifennu:

I would like to have a command button on my sheet that when clicked
opens up a user input box.

The user then enters a numeric value and I would like this value to be
found on the worksheet i.e search for the value within column A or
range A1 to A65536.

If the value is found within the range then I need to activate the
cell otherwise if the value is not found then I would like a message
box to appear saying the value was not found and then show the input
box again.


Would

Range("A:A").Select
Application.Dialogs(xlDialogFormulaFind).Show "", 1, 1, 1, 1, 0

....work for you?

--
Rob

http://www.asta51.dsl.pipex.com/webcam/

This message is copyright Robert Bruce and intended
for distribution only via NNTP.
Dissemination via third party Web forums with the
exception of Google Groups and Microsoft Communities
is strictly prohibited and may result in legal action.



Rob Keel

Using an input box to search for a value ...
 
Robert Bruce wrote:

Roedd <<Steve Tate wedi ysgrifennu:

I would like to have a command button on my sheet that when clicked
opens up a user input box.

The user then enters a numeric value and I would like this value to
be found on the worksheet i.e search for the value within column A
or range A1 to A65536.

If the value is found within the range then I need to activate the
cell otherwise if the value is not found then I would like a message
box to appear saying the value was not found and then show the input
box again.


Would

Range("A:A").Select
Application.Dialogs(xlDialogFormulaFind).Show "", 1, 1, 1, 1, 0

...work for you?


Thanks Rob. That works.

--
Rob Keel.


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com