'VBA, network name cannot be found

The code I'm using is this, where myURL is a sharepoint folder,

objNet.MapNetworkDrive letter_drive, myURL

For some reason, this line of code usually works, the odd it fails with an error "network name cannot be found". Sometimes after failing, simply clicking run will carry on without an error.

vba


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source