LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Path Name issue for file opened from Z drive

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get path to file used as a template from opened copy XP Excel Programming 1 October 15th 07 09:30 PM
Windows API to Determine if File is Local/Convert Path to Drive Letter Johnny[_10_] Excel Programming 0 March 10th 06 01:20 PM
macro to retrieve path to opened file windsurferLA Excel Programming 3 February 17th 05 10:05 PM
Reflect file path (show drive letters) in Excel 2000 Alicia Excel Discussion (Misc queries) 4 January 20th 05 06:49 PM
How set file open path to filepath of file opened with Explorer ? RandyDtg1 Excel Programming 0 May 14th 04 02:05 AM


All times are GMT +1. The time now is 09:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"