request help with network paths

D

DDawson

I have a workbook open event that opens and vlooksup other Wbooks on my
office network.

My manager wants to use this, but the problem is, my code refers to the
linked books at the location: I:\example\path\workbooks\ and my managers PC
is set up so that the path should be T:\example\path\workbooks\.

Is there a simple way round this?

I enclose the code, below for further information.

Kind Regards
Dylan

Private Sub Workbook_Open()

Dim wbk1 As Workbook
Dim wbk2 As Workbook

Set wbk1 = Nothing
Set wbk2 = Nothing

On Error Resume Next
Set wbk1 = Workbooks("Export_Requests.csv")
Set wbk2 = Workbooks("Project Summary.xls")
On Error GoTo 0

If wbk1 Is Nothing Then
On Error GoTo 0
Set wbk1 = Workbooks.Open _
("I:\A&T Contracts\000 Utilities\Export_Requests.csv")
On Error GoTo 0

If wbk1 Is Nothing Then
MsgBox "Export_Requests.csv didn't open!"
Exit Sub
End If
wbk1.Windows(1).Visible = True
End If

If wbk2 Is Nothing Then
On Error Resume Next
Set wbk2 = Workbooks.Open _
("I:\A&T Contracts\000 Utilities\Project Specific\Contract
Docs\Integrated Utility Services\Option E\Payment\Project Summary.xls")
On Error GoTo 0
If wbk2 Is Nothing Then
MsgBox "Project Summary.xls didn't open!"
Exit Sub
End If
wbk2.Windows(1).Visible = True
End If

End Sub
 
S

Stefi

One way is to use server and path names instead of drive letters. If your
drive I: refers to e.g.
\\servername\folder\

then use

Set wbk1 = Workbooks.Open _
("\\servername\folder\A&T Contracts\000
Utilities\Export_Requests.csv")

Regards,
Stefi

„DDawson†ezt írta:
 
D

DDawson

Thanks Stefi, I tried but still can't get it.

Can you please have a look at the drive below and advise what I should call
it?

In my explorer window the drive looks like:
Data on 'Thompson01\Vol2' (I:)

I have tried \\Thompson01\Vol2\...etc.
and \\Data\..etc.

Thanks
Dylan
 
S

Stefi

Check accessibility of folders by double clicking on them in the explorer
window (on both machines). It should work, check again path names!
Stefi


„DDawson†ezt írta:
 
D

Dave Peterson

I leave the path as a UNC path.

How about:
\\Thompson01\Vol2\data

You can verify this by using the windows start button|Run (flying windows-r) and
typing the path and hitting enter.

In fact, you may be able to type:
\\Thompson01
and just double click your way down the directory structure.
 

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