Run macro on cell edit
Instead of:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Use:
Private Sub Worksheet_Change(ByVal Target As Range)
"Defoes Right Boot" wrote:
Getting closer! That runs the macro as soon as the cell is highlighted, not
after it's edited, is there any way to do it after the cell is edited?
Thanks
Phil
"Mike Fogleman" wrote:
Right click on the worksheet tab and select View Code. At the top of the
right half of the edit pane click the down arrow beside (General) and select
Worksheet. Paste this code in the edit window:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("F4"), Target) Is Nothing Then
Call Your Macro
End If
End Sub
The macro you want to run should be in a general code module, not this one.
Mike F
"Defoes Right Boot" wrote in
message ...
I need to make a macro run whenever cell F4 (strictly speaking the merged
cells F4:F6) on the current worksheet is edited. I'm sure this must be
possible but can't find anything in the help files or online to tell me
how...
Any ideas?
Thanks
Phil
|