excel worksheet object

  • Thread starter Thread starter generallevy
  • Start date Start date
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
 
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.
 
Sorting is done through the Sort method of a Range object through a
Worksheet object.

See EXCEL VBA Help for examples.
 
Back
Top