Delete key not activating Worksheet_Change procedure

BigDelGooner

Board Regular
Joined
Aug 17, 2009
Messages
197
Hi all

The code below works fine when I change a value in cells B6,B7 or B8 but when I delete a value in these cells using the delete key the procedure is not activated. I presume its that the delete key command is effectively classed as a ClearContents and not an actual change, any ideas on a workaround for this though?

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$6" Then
FrontPage_Summary
End If

If Target.Address = "$B$7" Then
FrontPage_Summary
End If

If Target.Address = "$B$8" Then
FrontPage_Summary
End If
End Sub
 
No because I setup a variable to check the address of the the target cell and it still said $B$6...just going to put it down as a merged cellism :-)
Ho-hum. Odd that. I was wondering if there was a reasonable technical explanation for what went wrong. As you say "merged cellism" tends be to blame but I wondered if there was some logic to why it didn't work.
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
A possible work-around (if you don't want to or can't unmerge cells), seems to be available using Target.Cells(1).Address in place of Target.Address
 
Upvote 0
A response over 3 years later...that is dedication sir!

Thank you though, always useful.

By far the best Excel community.
 
Upvote 0
@BobbyCharltons:

Not testing tonight, but I ('blond' brain and all) think I will remember that! Nicely done!

Mark
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top