Determine Selected Cells

J

John Tripp

In a VBA macro how do I determine the current selected
range. I am sure this is trivial, but I am having no luck
finding an example of code to do this.

Thanks for any help.

John
 
B

Bob Phillips

John,

If you want to determine if a particular cell is selected, use something
like

If Not Intersect(Selection, Range("B99") Is Nothing Then
...

or

If Not Intersect(Selection, Range("B99:B100") Is Nothing Then
...
 
J

John Tripp

-----Original Message-----
In a VBA macro how do I determine the current selected
range. I am sure this is trivial, but I am having no luck
finding an example of code to do this.

Thanks for any help.

John
.
 

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