Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to Save on a Network Drive using UNC?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default How to Save on a Network Drive using UNC?

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
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
Excel slow to save to network drive Chris Excel Discussion (Misc queries) 1 May 8th 08 09:43 PM
My computer will not save to my network drive helpsaving Excel Discussion (Misc queries) 1 April 19th 06 05:39 AM
Excel 2k3: Workbook on network drive, when save creates new file AVCCTech Excel Discussion (Misc queries) 1 July 7th 05 08:05 PM
Automatically save a copy of worksheet from C: to Network Drive doosbug Excel Discussion (Misc queries) 1 May 3rd 05 06:23 PM
why am I unable to save a Excel file on a network drive%3f ken Excel Worksheet Functions 3 March 18th 05 01:55 AM


All times are GMT +1. The time now is 12:32 PM.

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

About Us

"It's about Microsoft Excel"