Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't know.
-- Gary''s Student - gsnu200800 "Barb Reinhardt" wrote: Wonderful! It's remapped when I'm connected to the Office network, but when I'm working offsite, I have to remap it myself, otherwise I can't get to anything programmatically. This is a snippet of code that I use when I map it offsite in a VBScript file. Is there something I should change. Admittedly, I'm not a VBScript expert. Set objNetwork = Wscript.CreateObject("WScript.Network") strUserName = objNetwork.UserName on error resume next objNetwork.MapNetworkDrive strdirectory, strpath & strusername Thanks, Barb Reinhardt "Gary''s Student" wrote: Maybe its the mapping technique. From a command window issue: net use Z: /delete /y net use Z: "\\server\" /PERSISTENT:yes Of course, make sure the full server path is in the second command. The commands can be put in a .bat or a .wsh file, if you prefer. Then from My Computer, open the Z: drive and then open the Excel file by double-clicking the icon. Then: Sub ordinate() MsgBox (ThisWorkbook.Path) End Sub -- Gary''s Student - gsnu200800 "Barb Reinhardt" wrote: I have mapped server \\server\ to my Z drive. When I open files from this mapped drive and display the workbook.path, it doesn't show Z, but it shows \\server\filename.xls. Is there some way to have it keep the Z drive without hard coding the mapping? Thanks, Barb Reinhardt |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Get path to file used as a template from opened copy | Excel Programming | |||
Windows API to Determine if File is Local/Convert Path to Drive Letter | Excel Programming | |||
macro to retrieve path to opened file | Excel Programming | |||
Reflect file path (show drive letters) in Excel 2000 | Excel Discussion (Misc queries) | |||
How set file open path to filepath of file opened with Explorer ? | Excel Programming |