SOLVED

AfterUpdate of cell - MSG box

Steel Contributor

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. 

4 Replies

@Tony2021 

Is this about a cell that will be edited by the user? Or does the cell contain a formula? Or something else?

HI Hans, it will be edited by the user. No formulas. thank you
best response confirmed by allyreckerman (Microsoft)
Solution

@Tony2021 

Right-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.

Nice. Thank you. I had thought data validation could do this somehow but VBA is ok too. Thank you Hans.
1 best response

Accepted Solutions
best response confirmed by allyreckerman (Microsoft)
Solution

@Tony2021 

Right-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.

View solution in original post