>Hi,
>Thanks for replied,
>yes, actually what I meant is executing code that stored in memo field, the code is :
>With This
> If VARTYPE(lnCode) = "N"
> .ExecuteCode(lnCode)
> Endif
>Endwith
>
>I think it's not possible to put it into variables line by line (I haven't tried it though), and also can't compile it to a .prg file since it generates error message "This can only be used within method".
>So probably any other idea ?
>
>Thanks
Senna, try this:
CREATE table test ( field1 c(10), myMemo m(10) )
SET MEMOWIDTH to 100
APPEND blank
REPLACE mymemo with "clear" + chr(13) + "set date american" + chr(13) + "?date()"+ ;
chr(13)+ "set date YMD" + chr(13)+ "?date()" + ;
chr(13) +"?curdir()" + ;
chr(13) +"?'We are borg. You will be assimilated. Resistance is futile.'"
ACTIVATE SCREEN
_memline = 1
FOR n = 1 to memlines(myMemo)
lcCommand = MLINE(myMemo, n)
&lcCommand
ENDFOR
Note that &lcCommand goes instead of your .ExecuteCode(lnCode)
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison