Excel/Automatically Open Hyperlink
QUESTION: I want to purchase a barcode scanner which can import a specific data(part number)from datas stored in bar code(item number,vendir code, GR number etc.)into a specific cell of Microsoft Excel 2007.
Then I want Excel to automatically open the hyperlinked attach to that number. In excel I have reached to a stage where excel is giving me link of the hyperlink as soon as I paste the item number in that cell. But I have to double click on the hyperlink manually to make it open . What I actually want is as soon as I scan data attached hyperlink gets opened
ANSWER: You would use a Worksheet_change event to watch for changes in your scanner cell.
Then your Hyperlink formula will update based on that code, correct?
The next step you will develop in your Worksheet_Change code is to do a FollowHyperlink method on the cell with the hyperlink formula.
---------- FOLLOW-UP ----------
Thankyou very much for fast reply.Sir I am rephrasing my question so that ypu understand it more correctly. Although what answer you gave me I understood and thats what I want.
But as I am new to excel I am not able to run followhyperlink method.Please help me by giving step by step procedure of how to display hyperlinked that is located in cell D6 of Sheet 2 of excel named test
I have a master file where in all pdfs are hyperlinked to a particular part number..
Part Number PDF
and so on...
Now in a different sheet I have used a formula =hyperlink(Vlookup(C6,Sheet1!B1:C3,2,0)) in D6 wherein it is showing me the pdf that I attached in master file while I scan the bar code and importing relevant data into C6 cell of excel
6 100***90(Inputting using bar code scanner) 100***90.pdf( this hyperlinked gets ____ displayed when part number is scanned)
But pdf gets displayed only when I click on to the hyperlink.Is there a way that pdf gets displayed as soon as I enter the part number.
Also, I will input the data in a same cell every time and as soon as i scam pdf gets displayed with no clicking of mouse or buttons .So can I use worksheet_change event.Please elaborate with step by step detail..please.please.please.
Please help on this matter. Thank you in advance.
1) 123.pdf is not a full address to a file, it's the name of a file. If you want clickable hyperlinks I'm assuming your lookup table actually has the full path to the files in question.
2) So, assuming you want to follow the hyperlink in cell D6 anytime cell C6 changes, something like this in the sheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C6")) Is Nothing Then
Range("D6").Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True