Home |
Search |
Today's Posts |
#1
|
|||
|
|||
range("a1").select not working
I have a line in my code: Sheets("CT Summary").Select Range("A1").Select when i run my code, the debugger stops at the range.select line. the cell is not hidden, the sheets are not protected. the error i get is: runtime error 1004: select method of Range class failed. i cant figure out what is wrong with this. any suggestions? -- tkaplan ------------------------------------------------------------------------ tkaplan's Profile: http://www.excelforum.com/member.php...o&userid=22987 View this thread: http://www.excelforum.com/showthread...hreadid=479822 |
#2
|
|||
|
|||
range("a1").select not working
Try this:
Sheets("CT Summary").Activate Activesheet.Range("A1").Select Randall Arnold "tkaplan" wrote: I have a line in my code: Sheets("CT Summary").Select Range("A1").Select when i run my code, the debugger stops at the range.select line. the cell is not hidden, the sheets are not protected. the error i get is: runtime error 1004: select method of Range class failed. i cant figure out what is wrong with this. any suggestions? -- tkaplan ------------------------------------------------------------------------ tkaplan's Profile: http://www.excelforum.com/member.php...o&userid=22987 View this thread: http://www.excelforum.com/showthread...hreadid=479822 |
#3
|
|||
|
|||
range("a1").select not working
I'm guessing that this code is behind a worksheet.
Unqualifed ranges in that kind of module refer to the sheet that owns the code. And I'm guessing that "CT Summary" isn't the sheet that owns that code. You could use: Sheets("CT Summary").Select Sheets("CT Summary").range("a1").select or application.goto Sheets("CT Summary").range("a1"),scroll:=true But you don't usually have to select a range to work with it. Sheets("CT Summary").range("a1").value = "hi there" is one way to assign a value directly to that cell. tkaplan wrote: I have a line in my code: Sheets("CT Summary").Select Range("A1").Select when i run my code, the debugger stops at the range.select line. the cell is not hidden, the sheets are not protected. the error i get is: runtime error 1004: select method of Range class failed. i cant figure out what is wrong with this. any suggestions? -- tkaplan ------------------------------------------------------------------------ tkaplan's Profile: http://www.excelforum.com/member.php...o&userid=22987 View this thread: http://www.excelforum.com/showthread...hreadid=479822 -- Dave Peterson |
#4
|
|||
|
|||
range("a1").select not working
thank you dave. You're right (again). CT summary does not own that code. I moved the code to a macro and called the macro and now it works:) thank you for the explanation though. I never knew that and it was driving me insane that it wasnt working. but now i know why:) -- tkaplan ------------------------------------------------------------------------ tkaplan's Profile: http://www.excelforum.com/member.php...o&userid=22987 View this thread: http://www.excelforum.com/showthread...hreadid=479822 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Working days left in the month compared to previous months | Excel Worksheet Functions | |||
How to project the due date according to a number of working hours | Excel Worksheet Functions | |||
Working time and days | Excel Worksheet Functions | |||
Working time and days | Excel Discussion (Misc queries) | |||
Trace Dependents and Precedents not working | Excel Worksheet Functions |