Hello all.
I am working on a workbook where I have inventoried items at my work place. This workbook contains quite a few pages and also over a 100 items per page. The idea with this was to have someone update the inventory and then when they save the file, it sends an email to the person responsible for them to order the items needed. The code I used is as follows.
This code works perfect for letting the person know the file is updated. But anyone with ADD would have looked over the file and not find the items that are low, even with conditional formating to where I have everything color coded per value.
What I want to do is add to this code of what cell was changed on a particular tab in the file. Is that possible?
I would hope that it would put it in the body of the email like it does with letting the person know what inventory was updated. If not is there a code that creates a new tab in the workbook tracking changes?
There was a code I tried before to where it would notify what cell was changed on the sheet, but the way it was structured, it would nag every instance a cell was clicked on the sheet.
I am working on a workbook where I have inventoried items at my work place. This workbook contains quite a few pages and also over a 100 items per page. The idea with this was to have someone update the inventory and then when they save the file, it sends an email to the person responsible for them to order the items needed. The code I used is as follows.
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim Outlook As Object, EMail As Object
Set Outlook = CreateObject("Outlook.Application")
Set EMail = Outlook.CreateItem(0)
With EMail
.To = [EMAIL="fakeemail@fakecompany.com"]fakeemail@fakecompany.com[/EMAIL] '. Change the email in quotes if responsibilities change
.CC = ""
.BCC = ""
.Subject = "Pipe Fittings "
.Body = "Has been updated at L:\Lab Supplies\Pipe Fittings"
.Send '.Send to skip preview .Display to preview email
End With
Set EMail = Nothing
Set Outlook = Nothing
End Sub
This code works perfect for letting the person know the file is updated. But anyone with ADD would have looked over the file and not find the items that are low, even with conditional formating to where I have everything color coded per value.
What I want to do is add to this code of what cell was changed on a particular tab in the file. Is that possible?
I would hope that it would put it in the body of the email like it does with letting the person know what inventory was updated. If not is there a code that creates a new tab in the workbook tracking changes?
There was a code I tried before to where it would notify what cell was changed on the sheet, but the way it was structured, it would nag every instance a cell was clicked on the sheet.