worksheet change doesn't always work

D

damorrison

I have noticed that the worksheet change doesn't always work,
expecially when I have been working on excel for a while and have
opened and closed a lot of workbooks,or if I have used VBA help alot...
if I reboot the computer and open a workbook that has a worksheet
change event it works fine, is there a way around this besides
rebooting the computer,
Here's the code I am using for one of the sheets: but I am sure it is
not the code because I have noticed this behaviour in othe workbooks...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$5" Then
Range("G5").Select
ActiveCell.FormulaR1C1 = "=ROUNDUP(RC[-1]/8.0625,0)"
Range("C5").Select
Application.SendKeys "%{down}"
End If
If Target.Address = "$C$5" Then
Range("D5").Select
Application.SendKeys "%{down}"
End If
If Target.Address = "$D$5" Then
Range("B10").Select
Application.SendKeys "%{down}"
End If

If Union(Range("$b10:$b12"), Target).Address =
Range("$b10:$b12").Address Then
UserForm2.Show False
myRow = Target.Row
End If


End Sub
 
M

mrice

It would be worth checking the status of Application.EnableEvents. If
this has been set to false by some process, the events aren't detected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top