>Sub FormatPrice > Dim oVFP As Object > Dim theLast as string && theLast declared > Set oVFP = CreateObject("VisualFoxPro.Application") > oVFP.Visible = True > oVFP.DoCmd "cd c:\page0\" > oVFP.DoCmd "set procedure to c:\page0\FormatPrices.prg" > Range("A1").Select > theLast = ActiveCell.Value > oVFP.DoCmd "FormatPri()" && Can VFP be aware of the value of theLast > ActiveCell.Value = theLast > oVFP.Quit > Set oVFP = Nothing >End Sub >1. Pass Excel.Application object to VisualFoxPro.Application this way
oVFP.SetVar("Excel", Application)2. Store value you need to pass to VFP in named Excel cell
oVFP.DoCmd("Clear all")
Hope it makes sense to youMake solutions, not programs!