ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excell work sheet (https://www.excelbanter.com/excel-programming/315719-excell-work-sheet.html)

alvis

Excell work sheet
 
Hi i am using VBA to retreve data from a sql 2000 database.
i then load the active worksheet with the recordset.
what i need to do is to display sorted data from the active worksheet into
another worksheet in the same workbook ie
i get dept, employee, salary, sicktime i need to sort by dept,employee and
salary with the results displaying on another sheet.

Jamie Collins

Excell work sheet
 
"alvis" wrote ...

i am using VBA to retreve data from a sql 2000 database.
i then load the active worksheet with the recordset.
what i need to do is to display sorted data from the active worksheet into
another worksheet in the same workbook ie
i get dept, employee, salary, sicktime i need to sort by dept,employee and
salary with the results displaying on another sheet.


You could use the recordset's Sort property to change the order of the
recordset, issue a MoveFirst and use the same approach to copy the
data the second worksheet as you did for the first. Note your
recordset will need a client side cursor to be able to sort it.

Jamie.

--


All times are GMT +1. The time now is 05:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com