OLE automation - use of .selection

R

Richard Abrahams

Dear Excel users,

I'm having problems trying to use the .selection property from VB code
within an MS Access module. It doesn't seem to be available! It's
available within Excel. I want to sort a spreadsheet using OLE
automation. The code for doing this within Excel selects the range and
uses the '.selection' property for executing the sort. This property
doesn't show up in the 'intellisense' options and an error is
generated when I attempt to use it.

Any ideas on what's going on, or how to execute a spreadsheet sprt
using automation, would be gratefully received.

Thanks.

Richard Abrahams
 
T

Tom Ogilvy

assume your reference to the excel application is oxlapp

then do

oxlapp.Selection
 
Top