Popup box to enter VLOOKUP value

C

Corey

Is this possible, if so how?
I have a simple VLOOKUP calc from 1 sheet to another.
Sheet1.

A1,B1,C1,D1 &E1, with A1 being the VLLOKUP value into Sheet2.

Rather than selecting the A1 CELL, and placing the value in there. And then the relevant info being displayed in the other cells,

How can upon opening up the excel file, a POPUP window with a text box and an OK button appears, and the value is placed into this and the VLOOKup search
is then completed.

Any idea's code for this, if possible?
Regards
Corey....
 
G

Guest

Use the Workbook_Open event. This must be in the ThisWorkbook module

Private Sub Workbook_Open()
res = InputBox("Please enter the value to lookup")
if res <> "" then
worksheets("Sheet1").Range("A1").Value = res
end if
End Sub

I assume you still want to use the formulas in the other cells to actually
contain the formula (vlookup) to retrieve the values.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top