Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default request help with network paths

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default request help with network paths

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:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default request help with network paths

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

"Stefi" wrote:

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:

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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default request help with network paths

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:

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

"Stefi" wrote:

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:

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default request help with network paths

Stefi

I managed to find the network path using a UNC_Path macro that I found
linked in another post.

Thanks again Stefi and thanks also to Tom Ogilvi for his useful link.

http://support.microsoft.com/default...b;en-us;192689
HOWTO: Get UNC Path From a Mapped Network Share's Drive Letter

Dylan


"Stefi" wrote:

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:

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

"Stefi" wrote:

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:

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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default request help with network paths

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.



DDawson wrote:

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

"Stefi" wrote:

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:

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




--

Dave Peterson
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
using network paths rather than drive letters in microsoft query samwardill Excel Discussion (Misc queries) 2 March 8th 06 01:10 PM
How Delete Network Password Request-Worksheet in Website brsscreen Excel Worksheet Functions 0 December 14th 04 07:47 PM
Using Network paths Rudolphs Excel Programming 0 January 26th 04 09:30 PM
Copying files ...Network to Network Eric[_6_] Excel Programming 2 July 18th 03 08:59 PM


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

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

About Us

"It's about Microsoft Excel"