Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Put network path in cell
Hi all, The Macro below put path in cell A1 which is "F:\Documents\Data
\Record.xlsx" Sub getpath() Range("A1").Value = ThisWorkbook.FullName End Sub I work in office and we save everything on network drive. The above file or path is actually in "\\Home\Trader\Documents\Data \Record.xlsx". Please can any friend can help that how can I make appear network path instead of drive path in cell A1. I tried code below to achive what i want but there must be some way in excel vba to get network path by code. Sub getpath() Range("A1").Value = "\\Home\Trader" & Right(ThisWorkbook.FullName, Len (ThisWorkbook.FullName) - 2) End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Put network path in cell
Refer the below link on UNC path
http://support.microsoft.com/kb/160529 -- If this post helps click Yes --------------- Jacob Skaria "K" wrote: Hi all, The Macro below put path in cell A1 which is "F:\Documents\Data \Record.xlsx" Sub getpath() Range("A1").Value = ThisWorkbook.FullName End Sub I work in office and we save everything on network drive. The above file or path is actually in "\\Home\Trader\Documents\Data \Record.xlsx". Please can any friend can help that how can I make appear network path instead of drive path in cell A1. I tried code below to achive what i want but there must be some way in excel vba to get network path by code. Sub getpath() Range("A1").Value = "\\Home\Trader" & Right(ThisWorkbook.FullName, Len (ThisWorkbook.FullName) - 2) End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Put network path in cell
One more
http://www.freevbcode.com/ShowCode.asp?ID=397 If this post helps click Yes --------------- Jacob Skaria "K" wrote: Hi all, The Macro below put path in cell A1 which is "F:\Documents\Data \Record.xlsx" Sub getpath() Range("A1").Value = ThisWorkbook.FullName End Sub I work in office and we save everything on network drive. The above file or path is actually in "\\Home\Trader\Documents\Data \Record.xlsx". Please can any friend can help that how can I make appear network path instead of drive path in cell A1. I tried code below to achive what i want but there must be some way in excel vba to get network path by code. Sub getpath() Range("A1").Value = "\\Home\Trader" & Right(ThisWorkbook.FullName, Len (ThisWorkbook.FullName) - 2) End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with this VBA Code and Network Printers (UNC Path) | Excel Programming | |||
Path to a network drive | Excel Discussion (Misc queries) | |||
Open Workbook using URL instead of network path | Excel Programming | |||
Saving to a Network Path using VBA | Excel Programming | |||
Network Path | Excel Programming |