S
Steve Douglas P2p, MCP
Hi all,
I am trying to write an if statment in vba which says,
if the value of cell d13 is blank (nothing) then msgbox "please enter
name" otherwise run the below subroutine.
This is the code i have, and am getting syntax errors, grateful for
any help on this one!
Sub Quote_Accepted()
If ActiveSheet.Range.Value("d13") = Null Then
MsgBox "Please Enter name before Authorising"
Else
ActiveSheet.Range("b2:b51").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "This Quote has been approved."
.Item.To = "(e-mail address removed)"
.Item.Subject = "Quote Accepted"
.Item.Send
End With
End If
End Sub
I am trying to write an if statment in vba which says,
if the value of cell d13 is blank (nothing) then msgbox "please enter
name" otherwise run the below subroutine.
This is the code i have, and am getting syntax errors, grateful for
any help on this one!
Sub Quote_Accepted()
If ActiveSheet.Range.Value("d13") = Null Then
MsgBox "Please Enter name before Authorising"
Else
ActiveSheet.Range("b2:b51").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "This Quote has been approved."
.Item.To = "(e-mail address removed)"
.Item.Subject = "Quote Accepted"
.Item.Send
End With
End If
End Sub