Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Kent,
Here's a barebones routine that waits for all three cells to change, then runs your code: Private Sub Worksheet_Change(ByVal Target As Range) Static Date1 As Boolean, Date2 As Boolean, Date3 As Boolean If Not Intersect(Range("B1"), Target) Is Nothing Then ' first cell Date1 = True End If If Not Intersect(Range("C1"), Target) Is Nothing Then ' first cell Date2 = True End If If Not Intersect(Range("D1"), Target) Is Nothing Then ' first cell Date3 = True End If If Date1 = True And Date2 = True And Date3 = True Then MsgBox "do your code here" Date1 = False Date2 = False Date3 = False End If End Sub The problem is that if the user wants to change only one or two, then go, it won't go. And it fires when they're cleared (deleted) too. Should not a button be used to run your code instead? -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Kent" wrote in message ... Is there a way to have a macro automatically run when dates are entered in cell B1 thru D1? Any help help would be awesome, thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Event Macro help | Excel Discussion (Misc queries) | |||
Event Macro running another macro inside | Excel Discussion (Misc queries) | |||
It seems to me that I need an event Macro, | Excel Worksheet Functions | |||
'Event' macro | New Users to Excel | |||
Event macro | Excel Programming |