PDA

View Full Version : Code retrives https:// in Windows Explorer instead of windows explorer drive



Cinema
04-05-2019, 01:44 AM
Hi,

I have the problem with ThisWorkbook.name in the following part of my code



str_FileName = Left(ThisWorkbook.name, InStrRev(ThisWorkbook.name, ".") - 1)

Unfortunately a https:// path is retrieved for ThisWorkbook.name instead of the drive's path, which I connected correctly with Sharepoint.
The Sharepoint folder is connected with Windows explorer, which I gave the name Z:\

Had someone the same problem and know how to solve it??

Kenneth Hobs
04-06-2019, 06:11 PM
Use Replace() to replace the string with the drive you want.

Cinema
04-08-2019, 12:50 AM
Hi Kenneth the problem is that the drive is always different.
Call foFS.CopyFile(ThisWorkbook.FullName, str_DestPathName, True)
How to copy the workbok without the path???

mancubus
04-08-2019, 04:29 AM
http://dedicatedexcel.com/universal-network-drive-mapping-with-excel-2010-vba/