You're welcome. Yes, it's very slick in deed. I now use almost no memvars, only a few memvat objects.
>>I use a memvar container object, it's "visble" to all the programs once it's initialized. It's really a simple and cool class, and extremely useful.
>>define class ParameterX as custom
>> function This_Access(tcMember)
>> if type('This.' + tcMember) = 'U'
>> This.AddProperty(tcMember)
>> endif
>> return This
>> EndFunc
>> function AddVar(tcMember,tcData)
>> AddProperty(this,tcMember,tcData)
>> return This
>> endfunc
>>EndDefine
>>
>>To use it:
>>If Vartype(oMemvar)#'O'
>> Public oMemvat
>> oMemvar=CreateObject('parameterX')
>>EndIf
>>oMemvar.maxrxs=20
>>oMemvar.myothervar='This text'
>>oMemvar.myLogval=.T.
>>In your case
>>For y = 2 To oMemvar.maxrxs
>> blah blah blah
>>Endfor
>>
>>
>
>Very slick. I think I'll use this!
>
>Thanks!
>
>>
>>>Hi Gang!
>>>
>>>Problem today is this.......
>>>
>>>I wanted to change some legacy code from this......
>>>(which is in a Form)
>>>
>>>
>>>For y = 2 To 20
>>> blah blah blah
>>>Endfor
>>>
>>>To this
>>>
>>>For y = 2 To MAXRXS
>>> blah blah blah
>>>Endfor
>>>
>>>
>>>Using a #DEFINE statment....
>>>(located in the MAIN.prg which calls the above Form)
>>>
>>>#DEFINE MAXRXS 20
>>>
>>>When I run the code, it bombs out with a "Variable MAXRXS not found".
>>>
>>>I recompile, rebuild...etc... but no luck.
>>>
>>>Where would you look?