something just not right in code, please help!
I'm trying to save the workbook to the location it was opened from, update
it, upon closing it it will change the name acording that what is in cells a1
and a2 and then e-mail it to the specified address. Pleae take a look and
let help with the correct coding.
Sub Mail_Workbook_2()
Dim wb1 As Workbook
Dim wb2 As Workbook
Dim wbname As String
Application.ScreenUpdating = False
Set wb1 = ActiveWorkbook
wbname = " " & " " & MTR & " " _
Range ("a1") & ("a2) & ".xls"
wb1.SaveCopyAs wbname
Set wb2 = Workbooks.Open(wbname)
With wb2
..SendMail ", _
"MTR"
..Close False
End With
Application.ScreenUpdating = True
End Sub
--
Thanks for all of your help,
Sherry
|