I have created a xls for my employer. It works absolutely fine on all the machine except only one machine.
It does not give me any error message on that particular machine. In fact When I check sent item on outlook it has the email also. But receiver does not receive the emails. I checked most of the things but could not find any problem. as it is working on all other machine its hard to pin point issue.. Here is the code i use.
Please guide me on this if anyone has encounter same problem...Set xlws = Sheets("Sheet1") Dim Recip() ReDim Preserve Recip(0) ReDim Preserve Recip(1) ReDim Preserve Recip(2) Dim toSend Recip(2) = "cpate@abc.com" Range("P10").Activate If ActiveCell.Value <> "store00@abc.com" Then 'First Email from J3 cell Recip(0) = ActiveCell.Value 'Recip(0) = "xyz@gmail.com" Range("P11").Activate If ActiveCell.Value <> "store00@abc.com" Then 'Second Email Recip(1) = ActiveCell.Value 'Checking if ListBox has warehouse Stores if Yes then we have to check 'if this is wine transfer or normal transfer If Range("G4").Value = "1" Or Range("G4").Value = "4" Or Range("G4").Value = "5" Or Range("G4").Value = "8" Then If Range("J4").Value = "1" Or Range("J4").Value = "4" Or Range("J4").Value = "5" Or Range("J4").Value = "8" Then If Range("P2").Value = "1" Then Recip(0) = "store0" & Range("G4").Value & "warehouse@abc.com" Recip(1) = "store0" & Range("J4").Value & "warehouse@abc.com" End If End If End If 'If it is warehouse transfer Recip value will be changed inside the if condition and 'Email will be sent to warehouse Department ActiveWorkbook.SendMail Recipients:=Recip, Subject:="Confirmation Email - Store to Store Transfer Form No" & " - " & Range("A1").Value Range("A2:N2").Select Range("P10").Select ActiveWorkbook.Save 'Following command Disable Email Button if email sent successfully Sheet1.CommandButton2.Enabled = False Else MsgBox "Please select valid To store" End If Else MsgBox "Please select valid From store" End If
Thanks in advance.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks