It would be easier to use AUSED( ) Function.
>I wrote a function that closes all tables in all work areas, except for the ones I pass in a parameter list. I use a for loop:
>
>for i = 1 to 255
>
>
>But I want to know how to test for the maximum number of workareas, depending on the version of foxpro, or whatever other variable determines it, so i can change it to:
>
>for i 1 to lnMaxWorkAreas
>
> I seem to recall that a function or system memory variable exists for this, but I can't seem to find it in the help.
>
>TIA
--sb--