Saving Files with Suggested Name

  • Thread starter Thread starter Dan M. Marr
  • Start date Start date
D

Dan M. Marr

On Sep 2nd at 3:20 I sent this question and got some
help. Now (I'm just now getting back to my code) and
find that my solution isn't working.

the follwing macro brings up the "SaveAs" dialog box and
suggests a file name as found in cell A1 on sheet SHEET1
but when you click on the SAVE button in the window,
nothing is saved. I'm hoping someone can tell me why or
how to correct this.

macro SAVE_ONNTWK()

Public Sub File_Save_Network()
Dim NamedFile$

NamedFile = Worksheets("Summary Sheet").Range _
("A1").Value

ChDirNet "\\Advint01\D Drive\Quotes\Contracting"

fileSaveName = Application.GetSaveAsFilename _
(InitialFileName:=NamedFile, Title:="Save _
Advantage Estimate")

If fileSaveName <> False Then
MsgBox "Save as " & fileSaveName
End If
End Sub
 
Dan,

Not sure but did you specify a file type?

Here's a code snippet I use where divname is the filename (without the
..xls). (mainpath is the path of the parent workbook. divcopies is just a
folder name.)

ActiveWorkbook.SaveAs FileName:=mainpath & "\divcopies\" _
& divname _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
 
Back
Top