You probably have a procedure getting called over and over somewhere. I have never seen anyone needing 65000 variables in a program.
Something else is going on to cause your issue. I would set step on somewhere deep into the program and see how many variables you have defined. You should only have a few public variables at any time, so if there are thousands you have a problem. You can have a few thousand LOCALs and that won't bother fox at all.