I have visual basic 2.0 Hopefully not for long. If I make a button that does a funtion like this. n = n + 1 print nit gives me a 1. I then click the same button and it stillgives me a 1 every time. When I put n = n + 1 two or threetimes in the same buttons it does the adding. Is this something to do visual basic 2.0 or do I have to declare ita global varable or something?
You do need a global variable. Define it in the declarations section of the form. Put the object list to (general) and the other list should say declarations. Dim N as integer in that section. Then, whenever or wherever you use the variable N, it will add or subtract from the same variable.