Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using network paths rather than drive letters in microsoft query | Excel Discussion (Misc queries) | |||
How Delete Network Password Request-Worksheet in Website | Excel Worksheet Functions | |||
Using Network paths | Excel Programming | |||
Copying files ...Network to Network | Excel Programming |