excel worksheet object

G

generallevy

Im using access xp to programme a very simple database. Ive got a button to
transfer some data into excel and its all working great but theres one thing
ive been stuck on for a while now and thats how to sort a worksheet as part
of the automation process.

Ive looked in the worksheet object in object explorer and there isnt a sort
option. Ive seen the xlsortdata, xlsortmethod listed outside the worksheet
object listed as enums. Would these be any good?

Thanks for your help

This is the snippet of code im using

With objSht
.Activate

For intWait = 1 To 100
DoEvents
Next

.Range("A7").CopyFromRecordset rs
.Columns("A:A").NumberFormat = "hh:mm:ss;@"
.Columns("C:C").NumberFormat = "hh:mm:ss;@"
.Columns("A:J").Select

End With
 
K

KC-Mass

I think you will get a much quicker and better rsponse if you post to an
Excel VBA news group
where they are mor familiar with the Excel object model and methods.
 
K

Ken Snell MVP

Sorting is done through the Sort method of a Range object through a
Worksheet object.

See EXCEL VBA Help for examples.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top