* *** original code * *** LPARAMETERS oDataObject, nEffect * *** LOCAL aValues, i, nSelected *-- Create an array containing the values of the items that * are currently selected in this listbox * *** nSelected = 0 * *** FOR i = 1 to This.ListCount * *** *-- If the item is selected, add it to an array * *** IF This.Selected( i ) * *** nSelected = nSelected + 1 * *** DIMENSION aValues[ nSelected ] * *** aValues[ nSelected ] = This.List( i ) * *** ENDIF * *** NEXT *-- The automatic formats that a ListBox has are CF_TEXT, * CFSTR_OLEVARIANT, and CFSTR_VFPSOURCEOBJECT. Since we want * to drag multiple items, we also will need to store the data * in a CFSTR_OLEVARIANTARRAY format. * *** IF nSelected > 0 * *** oDataObject.SetData(@aValues) * *** ENDIF * *** ******************************************************* * *** my code *** ActiveX Control Event *** LPARAMETERS DATA, allowedeffects * *** LPARAMETERS oDataObject, nEffect LOCAL aValues, i, nSelected *-- Create an array containing the values of the items that * are currently selected in this listbox DIMENSION aValues[9] aValues[1] = subs(THIS.SELECTEDITEM.TEXT, 1, 3) aValues[2] = subs(THIS.SELECTEDITEM.TEXT, 1, 3) aValues[3] = subs(THIS.SELECTEDITEM.TEXT, 1, 3) aValues[4] = subs(THIS.SELECTEDITEM.TEXT, 1, 3) aValues[5] = subs(THIS.SELECTEDITEM.TEXT, 1, 3) aValues[6] = subs(THIS.SELECTEDITEM.TEXT, 1, 3) aValues[7] = subs(THIS.SELECTEDITEM.TEXT, 1, 3) aValues[8] = subs(THIS.SELECTEDITEM.TEXT, 1, 3) aValues[9] = subs(THIS.SELECTEDITEM.TEXT, 1, 3) *-- The automatic formats that a ListBox has are CF_TEXT, * CFSTR_OLEVARIANT, and CFSTR_VFPSOURCEOBJECT. Since we want * to drag multiple items, we also will need to store the data * in a CFSTR_OLEVARIANTARRAY format. *IF nSelected > 0 *Data.SetFormat("OLE Variant Array") DATA.SETDATA(@aValues, "OLE Variant Array") && error *ENDIFthe error occurs at the "DATA.SETDATA(@aValues, "OLE Variant Array")". i get a "Type MissMatch" error from the activeX. the array has aValues character data in all elements.