Network address not Local Address

I

ianripping

I have this code: -

Dim This
This = ThisWorkbook.Name
Sheets("macro").Select
Dim fname
Dim path
Dim wbk As Workbook
path = ActiveSheet.Range("A1").Value
fname = ActiveSheet.Range("A2").Value
On Error Resume Next
Set wbk = Workbooks(fname)
On Error GoTo 0
If wbk Is Nothing Then
Workbooks.Open (path & fname)
Set wbk = ActiveWorkbook
End If

in A1 I inset the file path
in A2 I insert the file name

I am on a network, and would like to be able to insert the networ
address in the path because people in the company have the drive mappe
on different drive letters.

Is there any way of doing this
 
J

jaf

Hi Ian,
If a1=servername\sharename\path there should be no problem.
Or is thatservername/sharename/path?



--
John
johnf 202 at hotmail dot com


| I have this code: -
|
| Dim This
| This = ThisWorkbook.Name
| Sheets("macro").Select
| Dim fname
| Dim path
| Dim wbk As Workbook
| path = ActiveSheet.Range("A1").Value
| fname = ActiveSheet.Range("A2").Value
| On Error Resume Next
| Set wbk = Workbooks(fname)
| On Error GoTo 0
| If wbk Is Nothing Then
| Workbooks.Open (path & fname)
| Set wbk = ActiveWorkbook
| End If
|
| in A1 I inset the file path
| in A2 I insert the file name
|
| I am on a network, and would like to be able to insert the network
| address in the path because people in the company have the drive mapped
| on different drive letters.
|
| Is there any way of doing this?
|
|
| ---
| Message posted
|
 

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