Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I need help getting a message box with a unc file path to pop up(ie. \
\server1\folder1\file1) my current code is Sub whatisfilepath() MsgBox ActiveWorkbook.Path End Sub i need to know if it is possable to have a unc file path any help is good help. |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Untried as I don't have a network at home but....
Private Declare Function WNetGetConnection Lib "mpr.dll" _ Alias "WNetGetConnectionA" _ (ByVal lpszLocalName As String, _ ByVal lpszRemoteName As String, _ cbRemoteName As Long) As Long 'basics created by Frank Isaacs (www.DolphinTechnology.com/Frank) '10/24/2000 '/========================================== Sub UNCfromLocal() 'Find UNC from Local path 'i.e. Local drive "F:" = "\\RdaServer3\sys1" Dim sLocal As String Dim sRemote As String * 255 Dim lLen As Long Dim strAnswer As String sRemote = String$(255, Chr$(32)) lLen = 255 sLocal = UCase(InputBox("Enter Local Drive Letter", "Do NOT use ':' ...")) WNetGetConnection sLocal, sRemote, lLen MsgBox sLocal & ": " & sRemote End Sub '/========================================== " wrote: I need help getting a message box with a unc file path to pop up(ie. \ \server1\folder1\file1) my current code is Sub whatisfilepath() MsgBox ActiveWorkbook.Path End Sub i need to know if it is possable to have a unc file path any help is good help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Variabilize File Path or File Name in SumProduct (and Vlookup too) | Excel Worksheet Functions | |||
Formula too long - new file path is shorter than old file path - Excel 2003 | Excel Worksheet Functions | |||
file path | Excel Discussion (Misc queries) | |||
file path | Excel Discussion (Misc queries) | |||
Excel updating from XML file - file path specific? | Excel Discussion (Misc queries) |