Need help in small command button Project!!

tv9_rohith

Board Regular
Joined
Sep 1, 2011
Messages
96
I want to do a small project with 2 sheets in the same excel sheet, it can be done using Vlookup in excel but I want to make a document very people can just input the value in the textbox1 and click on command button and related information should display in the 2 textbox which will be pulled from the Sheet2( which will be hidden ).

I have an example below but I have more data than this :

In the First sheet I am planning to place a 2 text boxes and one command button.

1 text box is to input the data

2 Text box is for output

and the command button has to be placed in sheet 1 to rerive data from sheet2 cells.

--

In sheet 2

in 1st column I will give site name's like

Yahoo
Google
Wikipedia
youtube

and in the second column I will the site URL's like

Yahoo.com
Google.com
Wikipedia.com
youtube.com


and when i input data - "Yahoo" in 1 Text Box ( sheet 1 ) and then click on Command button it should retrive me value from sheet2 Column 2.( i.e., Yahoo.com ) and the output should display in 2 Textbox which is there in sheet 1.

Please help me I dont know not getting any idea how to do this..

and kindly note that I will not be able to place combo boxes in this sheet since the lookup data is big.
 
any more details with the error?

try

Code:
thisworkbook.sheets("Sheet1").textbox1.text = ""
thisworkbook.sheets("Sheet1").textbox2.text = ""

or go back to the properties menu and put the text as " " (just a space the space bar) see if thatworks instead of the above first :)
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
what are you typing to try and get the message box? it will only fail if Google or Yahoo or anything like that does not exsist, eg if you type in dfgsdf and search for it.
 
Upvote 0
if I try to type yahoo or google then Im gettng the desired value in Text box 2.

But suppose if I type my name in the Text box 1 - I.e., Rohith then Im not getting the msg box instead Im getting the error.

Run Type Erro "13"

type mismatch

END DEBUG HELP
 
Upvote 0
and also regarding Tetx Box 2 even after changing the value in LOCKED to TRUE Im able to enter the characters in the texbox.
 
Upvote 0
that is strange indeed, purhaps try putting the msgbox before the exit sub line see if that helps :)

otherwise id need the workbook to have a look (can upload to free filesharing site and ill download from there).

with the locked, the worksheet also has to be locked as far as I know. otherwise nothing will happen
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top