*------code from command button that works, lists correct files selected in list-------- FOR nCnt = 1 TO ThisForm.List1.ListCount IF ThisForm.List1.Selected(nCnt) ThisForm.List1.List(nCnt) && Show item ENDIF ENDFOR *------------end first code *---begin problem code--- CASE thisform.optiongroup2.value =2 LOCAL ncnt as integer FOR ncnt = 1 TO ThisForm.list1.ListCount IF ThisForm.list1.Selected(ncnt) lcfilename = ThisForm.list1.List(ncnt) lcoutputname = substr(lcfilename,1,len(lcfilename) -4) loxcel.Workbooks.Open(lcxlspath+lcfilename) loxcel.Application.ActivePrinter = "Acrobat PDFWriter on LPT1:" loxcel.ActiveWorkbook.PrintOut( , ,"1", ,"Acrobat PDFWriter on LPT1:","true", ,lcpdfpath + lcoutputname) loxcel.Workbooks.close thisform.laxls(ncnt,2) = "PRINTED" thisform.list1.requery() ENDIF ENDFOR ENDCASE