Sorry. I know Dave Hawley has posted "automatically run excel macros when a cell changes/enter data" but I'm being a bit thick!!
I'm trying to get a macro to delete an entry in cell H12 of a worksheet called "Detail" if a new number is typed into cell E6 of the same sheet and either "Enter" or "tab" keyed to commit the number.
I've read a few responses about worksheet_change event, but am not quite sure how to tell the "Private sub worksheet selectionChange (ByVal Target as Range) sub to know that it's the change in cell E6 that runs my macro called data_delete (or even simpler, just deletes the data in cell H12)
I'd be grateful for a guide in really simple english as i'm feeling very stupid at present!
Many thanks in advance.
Searched elsewhere as well as here and get a response which did the job for me, so i've posted the solution in case anyone else comes across this later on and needs the answer:-
Answered by e-mail with thanks toVB:Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$E$6" Then Range("H12").ClearContents End If End Sub
Pearson Software Consulting, LLC
Last edited by royUK; November 15th, 2005 at 22:03. Reason: edit code tags
There are currently 1 users browsing this thread. (0 members and 1 guests)