Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I am trying to save a file onto a network drive. My problem is, several different departments have different drive mappings. We all have different drive letters for our shared directory, so I can't use my current procedures... Private Sub CommandButton_Click() ChDrive "C" ChDir "C:\Dir" ActiveWorkbook.SaveAs "filename" & Format(Now, "mmddyy_hhmmss") & ".xls" End Sub Instead of using ChDrive "C" and ChDir "C:\Dir" can I use it's UNC equivalent? and how do I do it? Thanks, Erwin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Erwin,
There's no need to change the current directory to save a workbook to a specific location. You could save it to a UNC share like this: ActiveWorkbook.SaveAs "\\Server\ShareName\Book1.xls" -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Scooby912" wrote in message ... Hi all, I am trying to save a file onto a network drive. My problem is, several different departments have different drive mappings. We all have different drive letters for our shared directory, so I can't use my current procedures... Private Sub CommandButton_Click() ChDrive "C" ChDir "C:\Dir" ActiveWorkbook.SaveAs "filename" & Format(Now, "mmddyy_hhmmss") & ".xls" End Sub Instead of using ChDrive "C" and ChDir "C:\Dir" can I use it's UNC equivalent? and how do I do it? Thanks, Erwin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel slow to save to network drive | Excel Discussion (Misc queries) | |||
My computer will not save to my network drive | Excel Discussion (Misc queries) | |||
Excel 2k3: Workbook on network drive, when save creates new file | Excel Discussion (Misc queries) | |||
Automatically save a copy of worksheet from C: to Network Drive | Excel Discussion (Misc queries) | |||
why am I unable to save a Excel file on a network drive%3f | Excel Worksheet Functions |