Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Does anyone know a common cause of/solution to the Select Method of Range Object failing. I'm running this code during the deactivat subfunction: cRow = Range("$A:$A").Cells(Rows.Count, 1).End(xlUp).Row Range(Cells(2, 1), Cells(cRow, 2)).Select This code worked last week, but this week it has decided to break. Cheers- Chris Krah -- cmk1 ----------------------------------------------------------------------- cmk18's Profile: http://www.excelforum.com/member.php...nfo&userid=604 View this thread: http://www.excelforum.com/showthread.php?threadid=38624 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When you set a breakpoint and step through the code, what does cRow
evaluate to? In article , cmk18 wrote: Does anyone know a common cause of/solution to the Select Method of a Range Object failing. I'm running this code during the deactivate subfunction: cRow = Range("$A:$A").Cells(Rows.Count, 1).End(xlUp).Row Range(Cells(2, 1), Cells(cRow, 2)).Select This code worked last week, but this week it has decided to break. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The deactivate event fires after the sheet with the code has lost the focus.
Thus you get the error because you can not select on that sheet. As written, you must be mistaken. It has probably never worked in the deactivate event. It is unclear where you are trying to select so not sure what to recommend. -- Regards, Tom Ogilvy "cmk18" wrote in message ... Does anyone know a common cause of/solution to the Select Method of a Range Object failing. I'm running this code during the deactivate subfunction: cRow = Range("$A:$A").Cells(Rows.Count, 1).End(xlUp).Row Range(Cells(2, 1), Cells(cRow, 2)).Select This code worked last week, but this week it has decided to break. Cheers- Chris Krahe -- cmk18 ------------------------------------------------------------------------ cmk18's Profile: http://www.excelforum.com/member.php...fo&userid=6047 View this thread: http://www.excelforum.com/showthread...hreadid=386242 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Publish method failing, can't understand why | Excel Programming | |||
Select Method of Sheets | Excel Programming | |||
Excel Copy Method Failing. | Excel Programming | |||
select method of range class failing ? | Excel Programming | |||
add method of validation failing | Excel Programming |