Here we are Tim, the finished article:
Private Sub CommandButton1_Click()
Dim FName1, FName2, Fullname
FName1 = Range("AU1").Value
If FName1 = "" Then End
FName2 = Range("B1").Value
If FName2 = "" Then End
Fullname = FName1 & FName2
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Fullname, FileFormat _
:=xlNormal, CreateBackup:=False
End Sub
Notice the if statements, they are there to stop Excel trying to save
files with no name defined. There must be values in both cells for the
code to work.
Hope this helps
---
Message posted from
http://www.ExcelForum.com/