Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Alain CROS
Bonjour
Sub LienReseau() Dim WshNetwork Set WshNetwork = CreateObject("WScript.Network") WshNetwork.MapNetworkDrive "G:", "OrdiPartage" Set WshNetwork = Nothing End Sub
Alain CROS
-----Message d'origine----- Bonjour,
Je cherche à établir un lien réseau sous la forme OrdiPartage et ce dans
une macro Excel.
J'ai cherché mais sans succès, peut-être mal, mais en attendant là je séche
....
Merci d'avance à tous.
Cdlt,
.
Bonjour
Sub LienReseau()
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "G:", "\OrdiPartage"
Set WshNetwork = Nothing
End Sub
Alain CROS
-----Message d'origine-----
Bonjour,
Je cherche à établir un lien réseau sous la forme
\OrdiPartage et ce dans
une macro Excel.
J'ai cherché mais sans succès, peut-être mal, mais en
attendant là je séche
Sub LienReseau() Dim WshNetwork Set WshNetwork = CreateObject("WScript.Network") WshNetwork.MapNetworkDrive "G:", "OrdiPartage" Set WshNetwork = Nothing End Sub
Alain CROS
-----Message d'origine----- Bonjour,
Je cherche à établir un lien réseau sous la forme OrdiPartage et ce dans
une macro Excel.
J'ai cherché mais sans succès, peut-être mal, mais en attendant là je séche
....
Merci d'avance à tous.
Cdlt,
.
BrunoL
Bonsoir,
Tout d'abord, merci pour votre réponse.
Cela étant il me reste encore un léger problème : la connection est protégée par un mot de passe, comment l'indiquer à la méthode 'MapNetworkDrive' ?
Cdlt,
"Alain CROS" a écrit dans le message de news:1b87001c44fdf$0f3eed20$ Bonjour
Sub LienReseau() Dim WshNetwork Set WshNetwork = CreateObject("WScript.Network") WshNetwork.MapNetworkDrive "G:", "OrdiPartage" Set WshNetwork = Nothing End Sub
Alain CROS
-----Message d'origine----- Bonjour,
Je cherche à établir un lien réseau sous la forme OrdiPartage et ce dans
une macro Excel.
J'ai cherché mais sans succès, peut-être mal, mais en attendant là je séche
....
Merci d'avance à tous.
Cdlt,
.
Bonsoir,
Tout d'abord, merci pour votre réponse.
Cela étant il me reste encore un léger problème : la connection est protégée
par un mot de passe, comment l'indiquer à la méthode 'MapNetworkDrive' ?
Cdlt,
"Alain CROS" <PERSONNE@ICI> a écrit dans le message de
news:1b87001c44fdf$0f3eed20$a001280a@phx.gbl...
Bonjour
Sub LienReseau()
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "G:", "\OrdiPartage"
Set WshNetwork = Nothing
End Sub
Alain CROS
-----Message d'origine-----
Bonjour,
Je cherche à établir un lien réseau sous la forme
\OrdiPartage et ce dans
une macro Excel.
J'ai cherché mais sans succès, peut-être mal, mais en
attendant là je séche
Cela étant il me reste encore un léger problème : la connection est protégée par un mot de passe, comment l'indiquer à la méthode 'MapNetworkDrive' ?
Cdlt,
"Alain CROS" a écrit dans le message de news:1b87001c44fdf$0f3eed20$ Bonjour
Sub LienReseau() Dim WshNetwork Set WshNetwork = CreateObject("WScript.Network") WshNetwork.MapNetworkDrive "G:", "OrdiPartage" Set WshNetwork = Nothing End Sub
Alain CROS
-----Message d'origine----- Bonjour,
Je cherche à établir un lien réseau sous la forme OrdiPartage et ce dans
une macro Excel.
J'ai cherché mais sans succès, peut-être mal, mais en attendant là je séche
....
Merci d'avance à tous.
Cdlt,
.
Alain CROS
Bonjour
Je n'ai pas de réseau sous la main mais essaye comme ça.
Sub LienReseau() Dim WshNetwork Set WshNetwork = CreateObject("WScript.Network") WshNetwork.MapNetworkDrive "G:", "OrdiPartage", , , "LeMotDePasse" Set WshNetwork = Nothing End Sub
Voici la doc.
MapNetworkDrive Method
Adds a shared network drive to your computer system.
object.MapNetworkDrive(strLocalName, strRemoteName, [bUpdateProfile], [strUser], [strPassword]) Arguments object WshNetwork object. strLocalName String value indicating the name by which the mapped drive will be known locally. strRemoteName String value indicating the share's UNC name (xxxyyy). bUpdateProfile Optional. Boolean value indicating whether the mapping information is stored in the current user's profile. If bUpdateProfile is supplied and has a value of true, the mapping is stored in the user profile (the default is false). strUser Optional. String value indicating the user name. You must supply this argument if you are mapping a network drive using the credentials of someone other than the current user. strPassword Optional. String value indicating the user password. You must supply this argument if you are mapping a network drive using the credentials of someone other than the current user.
Alain CROS
"BrunoL" a écrit dans le message de news: cad0hq$7ru$
Bonsoir,
Tout d'abord, merci pour votre réponse.
Cela étant il me reste encore un léger problème : la connection est protégée par un mot de passe, comment l'indiquer à la méthode 'MapNetworkDrive' ?
Bonjour
Je n'ai pas de réseau sous la main mais essaye comme ça.
Sub LienReseau()
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "G:", "\OrdiPartage", , , "LeMotDePasse"
Set WshNetwork = Nothing
End Sub
Voici la doc.
MapNetworkDrive Method
Adds a shared network drive to your computer system.
object.MapNetworkDrive(strLocalName, strRemoteName, [bUpdateProfile], [strUser], [strPassword])
Arguments
object
WshNetwork object.
strLocalName
String value indicating the name by which the mapped drive will be known locally.
strRemoteName
String value indicating the share's UNC name (\xxxyyy).
bUpdateProfile
Optional. Boolean value indicating whether the mapping information is stored in the current user's profile. If bUpdateProfile is
supplied and has a value of true, the mapping is stored in the user profile (the default is false).
strUser
Optional. String value indicating the user name. You must supply this argument if you are mapping a network drive using the
credentials of someone other than the current user.
strPassword
Optional. String value indicating the user password. You must supply this argument if you are mapping a network drive using the
credentials of someone other than the current user.
Alain CROS
"BrunoL" <armand95@wanadoo.fr> a écrit dans le message de news: cad0hq$7ru$1@news-reader5.wanadoo.fr...
Bonsoir,
Tout d'abord, merci pour votre réponse.
Cela étant il me reste encore un léger problème : la connection est protégée
par un mot de passe, comment l'indiquer à la méthode 'MapNetworkDrive' ?
Je n'ai pas de réseau sous la main mais essaye comme ça.
Sub LienReseau() Dim WshNetwork Set WshNetwork = CreateObject("WScript.Network") WshNetwork.MapNetworkDrive "G:", "OrdiPartage", , , "LeMotDePasse" Set WshNetwork = Nothing End Sub
Voici la doc.
MapNetworkDrive Method
Adds a shared network drive to your computer system.
object.MapNetworkDrive(strLocalName, strRemoteName, [bUpdateProfile], [strUser], [strPassword]) Arguments object WshNetwork object. strLocalName String value indicating the name by which the mapped drive will be known locally. strRemoteName String value indicating the share's UNC name (xxxyyy). bUpdateProfile Optional. Boolean value indicating whether the mapping information is stored in the current user's profile. If bUpdateProfile is supplied and has a value of true, the mapping is stored in the user profile (the default is false). strUser Optional. String value indicating the user name. You must supply this argument if you are mapping a network drive using the credentials of someone other than the current user. strPassword Optional. String value indicating the user password. You must supply this argument if you are mapping a network drive using the credentials of someone other than the current user.
Alain CROS
"BrunoL" a écrit dans le message de news: cad0hq$7ru$
Bonsoir,
Tout d'abord, merci pour votre réponse.
Cela étant il me reste encore un léger problème : la connection est protégée par un mot de passe, comment l'indiquer à la méthode 'MapNetworkDrive' ?