VBA Code:
Unload Me
End Sub
Private Sub CommandButton3_Click()
Dim EmpID$, Pin$, Rg As Range, Pg As Range, x&
EmpID = TextBox1.Value
If Not IsNumeric(EmpID) Then MsgBox "ENTER VALID EMPLOYEE NUMBER TO HAVE YOUR PIN SENT TO YOUR EMAIL", vbExclamation: Exit Sub
With Sheets("BID RESULTS")
Set Rg = .Columns(1).Find(EmpID, lookat:=xlWhole)
If Rg Is Nothing Then
MsgBox "EMPLOYEE NUMBER DOES NOT EXIST PLEASE TRY AGAIN", vbExclamation: Exit Sub
Else
Set Rg = .Cells(Rg.Row, "D")
Set Pg = .Cells(Rg.Row, "KW")
On Error GoTo ErrHandler
Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")
Dim objEmail As Object
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.To = Rg
.Subject = "BIDDING TOOL BIN"
.Body = "YOUR PASSWORD FOR THE BIDDING TOOL IS: " & Pg. & "DO NOT REPLY TO THIS EMAIL"
.Display '
End With
Set objEmail = Nothing: Set objOutlook = Nothing
ErrHandler:
End If
End With
End Sub
I want to be able to use the above code to sent the email without sender email info. instead of sender information have "Password Team"