Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Probably another newb question from me, but: What is the proper syntax to use the Range(Cell(), Cell()) selection when accessing a different worksheet? example On sheet1 I have the code: Range(Cells(1, "A"), Cells(30, "A").select This will of course select the range of cells A1:A30 on sheet1 It also works fine if I use Worksheets("Sheet1").Range(Cells(1, "A"), Cells(30, "A")).select However, if I use the code to try to select a different sheet, ala: Worksheets("Sheet2").Range(Cells(1, "A"), Cells(30, "A")).select I get an error back: "Run-time error '1004': Application-defined or object-defined error" Even if I make sheet2 the activesheet the code still returns the same error. -- Ouka ------------------------------------------------------------------------ Ouka's Profile: http://www.excelforum.com/member.php...o&userid=23988 View this thread: http://www.excelforum.com/showthread...hreadid=388946 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using a cell in the worksheet as a range in a VBA routine | Excel Discussion (Misc queries) | |||
Copying cell with input range to different worksheet | Excel Worksheet Functions | |||
Worksheet Cell Range Name within VB Subroutine | Excel Discussion (Misc queries) | |||
selecting cell range in other worksheet without switching to worksheet | Excel Programming | |||
Hide cell range in worksheet | Excel Programming |