View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jeff Norville Jeff Norville is offline
external usenet poster
 
Posts: 7
Default copy application path to clipboard

Mm - looks like using the WshNetwork Object is the way to get the full
path - hence not exactly an Excel VBA function, you might say.

People trying to do the same thing:
http://www.spyjournal.biz/exceltips/...tranet-to.html

Cool code inventorying UNCs curried from:
http://www.dailydoseofexcel.com/arch...6/21/unc-path/
--------------------------------------
Sub NetworkMapDrive()
Dim WshNetwork As Object
Dim oDrives As Object
Dim DrivesStr As String
Dim i As Integer

Set WshNetwork = CreateObject("WScript.Network")
Set oDrives = WshNetwork.EnumNetworkDrives
DrivesStr = "Network drive Mappings:" & Chr(13)
For i = 0 To oDrives.Count - 1 Step 2
DrivesStr = DrivesStr & "Drive " & oDrives.Item(i) & " = " &
oDrives.Item(i + 1) & Chr(13)
Next
MsgBox DrivesStr
End Sub
--------------------------------------

Thanks,
jn

On Mar 9, 11:05*am, docksi wrote:
try this as the full path of your file:

ActiveWorkbook.Path & "\" & ActiveWorkbook.Name