Need help with VBA code

Joined
Nov 30, 2009
Messages
1
Reaction score
0
I am trying to use a macro in excel to auto save a file but need to do it so that it saves it to a different computer on a local network below is what i have that will work as long as it is only on the one computer

Sub SvMe()


Application.DisplayAlerts = False
Dim newFile As String, fName As String
fName = Range("n6").Value & " " & Range("h5").Text

ChDir _
"\Documents and Settings\Deputy Chief\Desktop\Time Sheets"
ActiveWorkbook.SaveAs Filename:=fName
Application.DisplayAlerts = True
Application.Quit
End Sub


the file when acessing it over the network listed as \\Chief\Time Sheets

I have tried that but with no luck any help wpuld be greatly appreciated
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Force save to CURRENT directory 5
Saving and Sharing with VBA 1
Excel activate in excel vba 0
Add Date to File Name 3
Saving a single worksheet 15
Excel Excel VBA BeforeSave 0
Need help in VBA for embedded object in excel 1
Run-time error '5': 3

Back
Top