Determine selected cells/rows in Excel

D

Dan Ricker

Yes and No...

There is an Application.Selection property but returns the
selection of the ActiveSheet.

If there are multiple open workbooks, then only what is
selected in the ActiveSheet of the ActiveWork book will be
returned.

If there is only one workbook, then what is selected on
the ActiveSheet is returned.

If no workbooks are active (hidden maybe) then an error is
returned.

Also, when multiple ranges are selected you will need to
deal with the "Areas" collection.
 
J

Julie

Thanks so much for the response!

It looks like ThisApplication.Selection is of
type "object" so I'm not sure how to use it. I couldn't
find reference documentation of the Office classes --
just samples and tips.

Any advice on how to use it (or a link to an example or
reference) would be greatly appreciated!

-- Julie
 

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