View Single Post
  #2   Report Post  
FSt1
 
Posts: n/a
Default

hi,
add the file path to the save.
i assume v2 and v3 are cells and it's being saved as an xl file.

ActiveWorkbook.SaveAs Filename:= _
"G:\2005\ATMT\" & v2 & "_" & v3 & ".xls", FileFormat:=xlNormal _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False

Regards
FSt1
"LB79" wrote:


Hello - Im having trouble with a save macro... When a user presses the
button i want the file to save itself to a a specific location. The
below is my caode which works apart from it saves to H:\ATMT instead
of G:\2005\ATMT. Can anyone see where im going wrong?

Thanks

Private Sub CommandButton6_Click()
Sheets("Report").Copy
v2 = Sheets("Report").Range("C10").Value
v3 = Sheets("Report").Range("N10").Value
ChDir "G:\2005\ATMT"
ActiveWorkbook.SaveAs Filename:= _
v2 & " " & v3, FileFormat:=xlNormal
End Sub


--
LB79
------------------------------------------------------------------------
LB79's Profile: http://www.excelforum.com/member.php...o&userid=12156
View this thread: http://www.excelforum.com/showthread...hreadid=398632