Leonard Gojer
asked on
How to get Excel "Cell" instruction to work
I'm trying to write an Excel VBA program that will use a worksheet to debug the steps of the code so that I can see where I am programming it incorrectly. I want to use the Cell instruction to display intermediate values of the code, but it doesn't do anything and actually causes the compiler/interpreter to stop and malfunction.
Please tell me how to invoke this instruction correctly.
Please tell me how to invoke this instruction correctly.
ASKER
I tried
ActiveSheet.Cells(20 + count, 1).value = r1 ' r1 = 0.70345 count = 0
and the Cell in question did not show anything
ActiveSheet.Cells(20 + count, 1).value = r1 ' r1 = 0.70345 count = 0
and the Cell in question did not show anything
ASKER
I believe that you are telling me the truth, but I also believe that there is something else wrong with my spreadsheet that is causing this bug. That's what I don't like about VBA, it doesn't handle bugs like C# does.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I even tried changing r1 to "123" and it did not work, because of other lines of code in the program that are causing the bug.
I don't want to take too much of your time, because I hired a programmer to help me with this.
Thank you for answering my question.
I don't want to take too much of your time, because I hired a programmer to help me with this.
Thank you for answering my question.
ASKER
Good job in answering me to the best of your abilities.
ActiveSheet.Cells(1,1).val