May 12 2021 08:48 AM
Hello, how can I show a message box once its updated? Not sure if this can somehow be done through data validation. I am sure it could be by VBA tho. Looking for a non VBA path but if VBA is the only way then I am ok with that but would kindly need the code.
thank you.
May 12 2021 09:07 AM
Is this about a cell that will be edited by the user? Or does the cell contain a formula? Or something else?
May 13 2021 01:57 PM
May 13 2021 02:06 PM
SolutionRight-click the sheet tab of the relevant sheet.
Select 'View Code' from the context menu.
Copy the following code into the worksheet module, replacing all occurrences of A1 with the cell that you want to monitor:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A1"), Target) Is Nothing Then
MsgBox "Cell A1 has been edited. Its value is now: " & Range("A1").Text, vbInformation
End If
End Sub
Switch back to Excel.
Save the workbook as a macro-enabled workbook (*.xlsm).
Make sure that you allow macros when you open the workbook.
May 13 2021 03:43 PM
May 13 2021 02:06 PM
SolutionRight-click the sheet tab of the relevant sheet.
Select 'View Code' from the context menu.
Copy the following code into the worksheet module, replacing all occurrences of A1 with the cell that you want to monitor:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A1"), Target) Is Nothing Then
MsgBox "Cell A1 has been edited. Its value is now: " & Range("A1").Text, vbInformation
End If
End Sub
Switch back to Excel.
Save the workbook as a macro-enabled workbook (*.xlsm).
Make sure that you allow macros when you open the workbook.