select path1; > from cheqs; > where bank= (thisform.pageframe1.page5.text6.value); > and branch= alltrim(thisform.pageframe1.page5.text3.value); > into cursor acc2 lnI = 0 lnMax = oexcel.activeworkbook.sheets.count > select acc2 > scan > pa=path1 lnI = m.lnI + 1 if m.lnI > m.lnMax exit endif > oexcel.Sheets(m.lnI).Name = juststem(pa) > endscan>Dear Experts
>select path1; > from cheqs; > where bank= (thisform.pageframe1.page5.text6.value); > and branch= alltrim(thisform.pageframe1.page5.text3.value); > into cursor acc2 > >for x=1 to oexcel.activeworkbook.sheets.count > select acc2 > scan > pa=path1 > oexcel.Sheets(x).Name = juststem(pa) > endscan >endfor >>The above procedure shows following error message