Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If Typename(ActiveCell) = "Range" Then
ActiveCell.Select End If "Chris Gorham" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tim; did you mean:
If Typename(Selection) = "Range" Then ? Regards, Vasant. "Tim Zych" wrote in message ... If Typename(ActiveCell) = "Range" Then ActiveCell.Select End If "Chris Gorham" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... Tim; did you mean: If Typename(Selection) = "Range" Then ? Regards, Vasant. "Tim Zych" wrote in message ... If Typename(ActiveCell) = "Range" Then ActiveCell.Select End If "Chris Gorham" wrote in message ... 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're right, Tim ... that's interesting. I thought it would throw an error.
I should have tested before I posted! Regards, Vasant. "Tim Zych" wrote in message ... 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. "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... Tim; did you mean: If Typename(Selection) = "Range" Then ? Regards, Vasant. "Tim Zych" wrote in message ... If Typename(ActiveCell) = "Range" Then ActiveCell.Select End If "Chris Gorham" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't check selection boxes | Excel Discussion (Misc queries) | |||
Limiting selection in a cell AND linking that selection to a list | Excel Discussion (Misc queries) | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
Increase size of a Forms Check Box (click on to enter check mark) | Excel Discussion (Misc queries) | |||
Check if Conditional Format is True or False / Check cell Color | Excel Worksheet Functions |