ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prompts (https://www.excelbanter.com/excel-programming/367121-prompts.html)

Carrguy

Prompts
 
I want to add a prompt when i change a date in a cell. I am using a date
field that is linked to several work sheets. When i change the date i want to
be prompted with a message " update Audit sign off book" If you guy s can
help me out that would be great. Thank you in advance

Charlie

Prompts
 
In the Worksheet_Change event for that sheet check if the changed cell is the
one where the date is entered

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address(False, False) = "A1" Then MsgBox "Update Audit Signoff book"

End Sub

(Replace "A1" with the necessary address)


"Carrguy" wrote:

I want to add a prompt when i change a date in a cell. I am using a date
field that is linked to several work sheets. When i change the date i want to
be prompted with a message " update Audit sign off book" If you guy s can
help me out that would be great. Thank you in advance


Tom Ogilvy

Prompts
 
Right click on the sheet tab and select view code. Paste in code like this.
Adjust to react to changes in the appropriate column (as written, the 3 means
the dates are in column 3)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
If Target.Column = 3 Then
MsgBox "update Audit sign off book"
End If
End If
End Sub

If it is a specific range of value only, assume C3:C20


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
If Not Intersect(Target,Range("C3:C20")) is nothing Then
MsgBox "update Audit sign off book"
End If
End If
End Sub

as an example.

--
Regards,
Tom Ogilvy


"Carrguy" wrote:

I want to add a prompt when i change a date in a cell. I am using a date
field that is linked to several work sheets. When i change the date i want to
be prompted with a message " update Audit sign off book" If you guy s can
help me out that would be great. Thank you in advance



All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com