Check Selection

  • Thread starter Thread starter Chris Gorham
  • Start date Start date
C

Chris Gorham

Hi,

I want to make sure that when I write code such as
activecell.select that the macro doesn't bug out because
an object such as a chart happens to be currently selected
on the s/sheet and not a cell range.

thks...Chris
 
Tim; did you mean:

If Typename(Selection) = "Range" Then

?

Regards,

Vasant.
 
Well, no because Typename(ActiveCell) returned "Nothing" if the activated
object was a chart.
Looks like one and the same for the purpose as stated.
 
You're right, Tim ... that's interesting. I thought it would throw an error.
I should have tested before I posted!

Regards,

Vasant.
 

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

Back
Top