Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all, is it possible to "map" to a network drive, open a file and
then "disconnect" the drive again with code ? This is necessary as not all users have access to the drive which is also password protected. Any help would be appreciated... Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why not just open the file via the UNC name.
You can do it in the file|open dialog or you can do it in code: Dim wkbk as workbook set wkbk = workbooks.open(Filename:="\\server\share\folder\fi le.xle") Les Stout wrote: Hello all, is it possible to "map" to a network drive, open a file and then "disconnect" the drive again with code ? This is necessary as not all users have access to the drive which is also password protected. Any help would be appreciated... Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
and that would probably be a .xls extension--not .xle!
Dave Peterson wrote: Why not just open the file via the UNC name. You can do it in the file|open dialog or you can do it in code: Dim wkbk as workbook set wkbk = workbooks.open(Filename:="\\server\share\folder\fi le.xle") Les Stout wrote: Hello all, is it possible to "map" to a network drive, open a file and then "disconnect" the drive again with code ? This is necessary as not all users have access to the drive which is also password protected. Any help would be appreciated... Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** -- Dave Peterson -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Dave, this drive is not mapped in all cases... I tried your
suggestion but it does not find the file and it is there. If i map the drive then it works fine but that is the initial problem... Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The drive doesn't need to be mapped to a letter if you refer to it by its UNC
path. Try recording a macro when you open the file manually using that UNC path. Maybe you mistyped something in the code and the recorded macro will help you find it. Les Stout wrote: Hello Dave, this drive is not mapped in all cases... I tried your suggestion but it does not find the file and it is there. If i map the drive then it works fine but that is the initial problem... Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
From share drive particular excel file takes long time to open | Excel Discussion (Misc queries) | |||
format Excel to open in particular drive/file | Excel Discussion (Misc queries) | |||
When I save a file on the hard-drive, it is fine, I can re-open, | Excel Discussion (Misc queries) | |||
WINDOWS CANNOT OPEN THIS FILE IN A:\ DRIVE | Excel Discussion (Misc queries) | |||
How do I open a file from a Network drive using Excel VBA? | Excel Programming |