Option Explicit Private Sub ComboBox1_Change() Range("A1").Value = Range("a1").Value + ComboBox1.Value End Subwhich is used in VBA but i've no idea that how to convert its to VFP codes
*- part of excel automation codes oExcel.Range("B4").Select *- oexcel.ActiveSheet.DropDowns.Add(50,3,40,10).Select && (Left,Top,Width,Height) *- thanks to Yuri Rubinov for adding combobox codes loCbo1 = oExcel.ActiveSheet.Oleobjects.Add("Forms.ComboBox.1",,,,,,,50,115,45,13).Object Select CboDay1 With loCbo1 Do While .ListCount > 0 .RemoveItem (0) Enddo Scan .AddItem(Alltr(CrsDay1.MyValue)) Endscan EndwithTIA