Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have never had an issue with this. I also have this code which will tell
you the server mapping of a local drive letter (for whatever it's worth)... Option Explicit Declare Function WNetGetConnection Lib "mpr.dll" Alias "WNetGetConnectionA" ( _ ByVal lpszLocalName As String, _ ByVal lpszRemoteName As String, _ ByRef cbRemoteName As Long) As Long Sub Test() MsgBox UNCfromLocalDriveName("P") End Sub Function UNCfromLocalDriveName(strLocalDrive) As String 'Find UNC from Local path 'i.e. Local drive "F:" = "\\RdaServer3\sys1" ' example of usage: UNCfromLocalDriveName("P") <-Actual Drive Letter ' or UNCfromLocalDriveName(A2) <-Cell reference ' Dim sLocal As String Dim sRemote As String * 255 Dim lLen As Long Application.Volatile sRemote = String$(255, Chr$(32)) lLen = 255 sLocal = strLocalDrive & ":" WNetGetConnection sLocal, sRemote, lLen UNCfromLocalDriveName = Trim(sRemote) End Function -- HTH... Jim Thomlinson "Kathryn208" wrote: Can office programs (Excel specifically) to recognize a network location that DOES NOT include a drive letter? For example, can Excel link to the datasource: \\server_name\folder_name\data_source.mdb Rather than: P:\folder_name\data_source.mdb |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Spreadsheets referencing Obsolete Drive Mappings | Excel Discussion (Misc queries) | |||
Link workbooks-C drive to network drive | Excel Worksheet Functions | |||
Userform Local Drive & Network drive question | Excel Programming | |||
Saving to Network share with different mappings? | Excel Programming |