Hi there,
Your problem involves the following statements:
The variable "s" is declared as an integer variable.
The For loop initialises the variable "s" with a value of zero, and then attempts to increment its value by 0.1 (dt) on each iteration of the loop.
Because it is declared as an integer variable, "s" can never increase its value by an amount of less than one, and consequently remains at zero regardless of how many times the For loop is executed.
Declare "s" as a variable of type Double and see if your code works correctly.
Note: your Dim statements are probably not doing what you intend! The statement:
declares the variable "i" as being of type VARIANT, and the variable "s" as being of type Integer. You should probably be using:
or:
Hope this helps - please let me know how you get on.
Regards,
Greg M
Bookmarks