PDA

View Full Version : Solved: Change event simply not working



Phelony
08-04-2011, 08:44 AM
Okay, I give up. I've scowered the internet, I've copied from previously written code that I know for sure works and I still can't get this simple change event to move an inch.

It's like it's not even there in the worksheet code...:help


Private Sub Worksheet_Change(ByVal Target As range)
If Target.Address = "$C$7" Then
Sheets("Revenue Dashboard").range("B1") = "=vlookup(C7,'dropdowns'!J:K,2,0)"
End If
End Sub


C7 is a drop down of month names, B1 is the trigger for a series of formulas that present information, B1 is also linked to a scrollbar which can also adjust the months. I've removed the scrollbar to see if that was the issue, it's not.

Something ain't right!! :bug:

Any ideas??

Phelony
08-04-2011, 09:15 AM
Okay this is just plain weird.

Enableevents had turned itself off. I wrote a quick macro:

application.enableevents = true

and it still didn't work. EnableEvents wouldn't even pop it's capital letters, almost as if my Excel had decided it objected.

Closed, reopened, everything works as it should.....

...too tired to think about it or my head might explode.

Thanks for looking if you did!