globalbear
IS-IT--Management
When I sometimes make changes to my VBA-code it doesn't seem to help - Excel still runs with my old code!
Example
Old code:
If Cells(6, 3) = "A" Then Cells(6, 3) = "A, Auto"
New code:
If Cells(6, 3) = "A" Then Cells(6, 3) = "A, Auto Reverse"
When I run this macro and cell C6 is set to "A" what does VBA do? Change it to "A, Auto Reverse" as it should? Nope, it changes the cell to "A, Auto". Aaaaaaaaaarghhhhhh!
It uses my old code that does not longer exist! What have I done wrong? Is there some stupid cache somewhere that I have to empty or is there a way to re-compile my code?
I have tried to restart Excel but that didn't help. I have had similiar problems a few times and sometimes it works with setting a remark ' in front of the line, run the code and then taking away the remark.
Is this some kind of general VBA-problem?
I'm running Excel 2003 SP1.
Example
Old code:
If Cells(6, 3) = "A" Then Cells(6, 3) = "A, Auto"
New code:
If Cells(6, 3) = "A" Then Cells(6, 3) = "A, Auto Reverse"
When I run this macro and cell C6 is set to "A" what does VBA do? Change it to "A, Auto Reverse" as it should? Nope, it changes the cell to "A, Auto". Aaaaaaaaaarghhhhhh!
It uses my old code that does not longer exist! What have I done wrong? Is there some stupid cache somewhere that I have to empty or is there a way to re-compile my code?
I have tried to restart Excel but that didn't help. I have had similiar problems a few times and sometimes it works with setting a remark ' in front of the line, run the code and then taking away the remark.
Is this some kind of general VBA-problem?
I'm running Excel 2003 SP1.