Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default 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....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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...

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default 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...



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get a popup window on a VLOOKUP lookup failure? Mark F[_2_] New Users to Excel 6 June 30th 11 12:41 AM
Vlookup if #N/A then enter enter data in cell I4 duketter Excel Discussion (Misc queries) 3 March 11th 08 09:08 PM
My first macro, uses Vlookup but doesnt update unless hit enter James Cornthwaite Excel Worksheet Functions 1 May 24th 06 10:01 PM
If Vlookup returns error enter 0 Midwest User Excel Worksheet Functions 2 March 28th 06 05:14 PM
WHY DO I HAVE TO CLICK ON THE CELL & ENTER FOR THE VLOOKUP TOWORK Half Manx Excel Discussion (Misc queries) 4 September 29th 05 12:12 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"