Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I want to have it so that on a column if a certain value is entered in any of the cells then a message is displayed to tell them to do something else. I want to be able to run a macro if the value is entered. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You can use a worksheet event ...
Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("a1")) Is Nothing Then Exit Sub If Target.Value = "" Then Exit Sub MsgBox "You just changed: " & Target.Address(0, 0) & vbLf & _ ". Now don't forget to..." End Sub Right click on the worksheet tab that should have this behavior. Select view code and paste this into the code window that just opened. Change A1 to the address of the cell you want to check. nickystan wrote: Hi, I want to have it so that on a column if a certain value is entered in any of the cells then a message is displayed to tell them to do something else. I want to be able to run a macro if the value is entered. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks - that was really helpful
"Dave Peterson" wrote: You can use a worksheet event ... Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("a1")) Is Nothing Then Exit Sub If Target.Value = "" Then Exit Sub MsgBox "You just changed: " & Target.Address(0, 0) & vbLf & _ ". Now don't forget to..." End Sub Right click on the worksheet tab that should have this behavior. Select view code and paste this into the code window that just opened. Change A1 to the address of the cell you want to check. nickystan wrote: Hi, I want to have it so that on a column if a certain value is entered in any of the cells then a message is displayed to tell them to do something else. I want to be able to run a macro if the value is entered. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Keyboard Macro Just Copies Content of Previous Cell | Excel Discussion (Misc queries) | |||
Macro help - copy a cell down | Excel Discussion (Misc queries) | |||
macro help | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |