Command button in Excel 2007

PicassoB

Novice
Local time
Today, 05:40
Joined
May 7, 2007
Messages
63
Help please I have been using a form in Excel 2003 with a command button that puts the form dirrectly into outlook (with the added email address) - since changing to 2007 the button just keeps giving the error msg. can any one see the problem with the code - as this still works fine in 2003 but not in 2007

Private Sub CommandButton1_Click()

Dim Response As Integer
Dim ManagerPin As Long

On Error GoTo ErrHandler
Response = MsgBox("Are you sure you want to Save and Send ?", vbYesNo + _
vbQuestion)
If Response = vbYes Then
Sheet1.SaveAs "c:\VehComForm.xls"

Application.Dialogs(xlDialogSendMail).Show _
("ukcustomersupport@akzonobel.com")
Application.Workbooks.Close

End If
Exit Sub
ErrHandler:
MsgBox ("Invalid Entry")
End Sub
 

Users who are viewing this thread

Back
Top Bottom