This should be obvious to me but I am having one of those days.
The code below saves the file as
R:\Cost\Development\Requote\mtxtSaveName.xls
where what i am actually trying to achieve is that it saves as the
result of mtxtSaveName to R:\Cost\Development\Requote
Any help would be appreciated
Regards
Adrian
Sub InsertDateAndSave()
'
Dim mtxtCustomerName As String
Dim mtxtBqName As String
Dim mtxtFcode As String
Dim mtxtRequoteDate As String
Dim mtxtSaveName As Variant
Range("B5").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("B5").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
mtxtCustomerName = Range("B6")
mtxtBqName = Range("B8")
mtxtFcode = Range("B7")
mtxtRequoteDate = Range("B5")
mtxtSaveName = (mtxtCustomerName & " " & mtxtBqName & " " & mtxtFcode
_
& " " & mtxtRequoteDate)
ActiveWorkbook.SaveAs Filename:= _
"R:\Cost\Development\Requote\mtxtSaveName.xls" ,
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub
--
SandyUK
------------------------------------------------------------------------
SandyUK's Profile:
http://www.excelforum.com/member.php...o&userid=17487
View this thread:
http://www.excelforum.com/showthread...hreadid=484845