i did something wrong
i was trying to reverse that both M and O need to be filled in see the red typing. this part of code is wrong it only works if first o is filled in and then i fill in M with the X
how can i do in the reverse as well?
i was trying to reverse that both M and O need to be filled in see the red typing. this part of code is wrong it only works if first o is filled in and then i fill in M with the X
how can i do in the reverse as well?
VBA Code:
Private Sub Macro3(ByVal Target As Range)
Dim Submission As String
Submission = Cells(Target.Row, "M")
I[COLOR=rgb(184, 49, 47)]f Target.Column = 13 And Target.Cells.Count = 1 Then
If Cells(Target.Row, "B").Value <> "" Then
If AscW(Target.Value & " ") = 10006 And Cells(Target.Row, "O").Value <> "" Or _
Cells(Target.Row, "O").Value <> "" And AscW(Target.Value & " ") = 10006 Then[/COLOR]
result = MsgBox("pressing OK will send email reminder", vbOKOnly + vbExclamation, "Missing Approval")
If result = vbOK Then
Set OutlookApp = CreateObject("Outlook.Application")
Set OlObjects = OutlookApp.GetNamespace("MAPI")
Set newmsg = OutlookApp.CreateItem(olMailItem)
newmsg.Recipients.Add ("[EMAIL]mail@mail.org[/EMAIL]") ' Add Recipients
newmsg.Subject = Cells(Target.Row, "B").Value & "Submitted Incorrectly" ' Add Subject
newmsg.Body = "This is a reminder to inform" & vbCrLf & "" & _
"Broker/Mom that " & _
Cells(Target.Row, "B").Value & " for" & _
Cells(Target.Row, "C").Value & " for" & _
Cells(Target.Row, "F").Value & " " & " " & _
Cells(Target.Row, "G").Value & " " & " " & _
Cells(Target.Row, "O").Value & " as per X on grid" 'Email Body
newmsg.Display 'Display Email
newmsg.Send 'Send Email
MsgBox "Outlook message sent", , "Outlook message sent" ' Confirm Sent Email
End If
End If
End If
End If
End Sub
Last edited by a moderator: