How do I set up a cell to where I can click on it and goto a file?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a log sheet file where I enter all purchase orders, I then create the
purchase order as another file. I would like to click on the cell in my
purchase order log and open the cooresponding purchase order file. Is this a
macro function, any suggestions?
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
With Target
Workbooks.Open Filename:= "C:\Purchase Orders\PO " & .Value &
".xls"
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


Adjujst the filename to suit.
 
Hi,

I think there is a solution w/o macros. You will have to create hyperlinks
to the relevant cell in the Purchase order file.

In the specific PO cell of the log file click do the following

Ctrl+K to go to hyperlinks
In the look in folder select the PO file
Click on Bookmark
In the "Type in Reference cell" type the reference cell of the relevant PO
Click OK now

Regards,

Ashish Mathur
 

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

Back
Top