![]() |
Popup box to enter VLOOKUP value
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.... |
Popup box to enter VLOOKUP value
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. -- Regards, Tom Ogilvy "Corey" wrote: 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... |
Popup box to enter VLOOKUP value
Thanks Tom,
works spot on. And it was so simple to implement too. Cheers Corey.... "Tom Ogilvy" wrote in message ... 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. -- Regards, Tom Ogilvy "Corey" wrote: 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... |
All times are GMT +1. The time now is 04:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com