>Really Michel, if you get any funtion that you did in Visual Basic and put this Funtion (with the VB commands) in your Visual Foxpro program this will work with any problem.
I tried some basic code in my command window:
?LEFT$("123456",2) ' crashed with function name missing
? MID$("ABCD",2,1) ' crashed again.
VBA will work inside VFP, but is is not the same as VBA script inside VB.
Imagination is more important than knowledge