Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default map network drive

Hello,

I would like to map a network drive when I open the worksheet. Something Like

Private Sub worksheet_open()
Net use y: \\server\share password /user ID
end sub

Can anyone help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default map network drive

Something like:

Sub map_um()
dq = Chr(34)
s = "net use z: /delete /y"
ss = "net use z: " & dq & "\\MAINSERVER\Shared" & dq & " /PERSISTENT:no"
x = Shell("cmd.exe /c" & s, 1)
x = Shell("cmd.exe /c" & ss, 1)
End Sub

Note I use the variable dq as I always have trouble embedding double quotes
in a string.
--
Gary''s Student - gsnu200790


"lumpy04" wrote:

Hello,

I would like to map a network drive when I open the worksheet. Something Like

Private Sub worksheet_open()
Net use y: \\server\share password /user ID
end sub

Can anyone help?

Reply
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
Network drive Greg Excel Worksheet Functions 1 January 13th 10 04:22 AM
Map Network Drive leerem Excel Discussion (Misc queries) 2 January 12th 09 07:11 PM
Using An Add-in On A Network Drive Using An Add-in On A Network Drive Excel Programming 5 June 15th 05 09:21 PM
Link workbooks-C drive to network drive Earl Excel Worksheet Functions 0 April 19th 05 05:50 PM
Userform Local Drive & Network drive question Joel Mills Excel Programming 3 December 29th 04 10:43 PM


All times are GMT +1. The time now is 08:23 PM.

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

About Us

"It's about Microsoft Excel"