Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can anyone tell me why doesn't work:
Range(Sheets("Word Analysis").Range("A2"), Sheets("KeyWord Analysis").Range("A2").End(xlDown)).EntireRow.Sele ct when this does: Range(Sheets("Word Analysis").Range("A2"), Sheets("KeyWord Analysis").Range("A2").End(xlDown)).EntireRow.Dele te shift:=xlUp I just want to select a cell on a different sheet! it keeps giving me this error code: Runtime error '1004': Select method of Range class failed I just want to select a cell on a different sheet! I cant even get a basic reference like: Worksheets("Keyword").Range("A1").Select to work unless I am already on the "Keyword" worksheet. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Activate the sheet first
With Worksheets("Keyword") .Visible = True .Activate .Range("A1").Select End With "elaine" wrote in message ps.com... Can anyone tell me why doesn't work: Range(Sheets("Word Analysis").Range("A2"), Sheets("KeyWord Analysis").Range("A2").End(xlDown)).EntireRow.Sele ct when this does: Range(Sheets("Word Analysis").Range("A2"), Sheets("KeyWord Analysis").Range("A2").End(xlDown)).EntireRow.Dele te shift:=xlUp I just want to select a cell on a different sheet! it keeps giving me this error code: Runtime error '1004': Select method of Range class failed I just want to select a cell on a different sheet! I cant even get a basic reference like: Worksheets("Keyword").Range("A1").Select to work unless I am already on the "Keyword" worksheet. Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do i get this to work? sorry for all the questions
the selection is on a currently selected worksheet that isn't "word list" Selection.Copy Destination:=Sheets("Word List").ActiveCell |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Elaine,
You cannot Select a cell if the worksheet containing that cell is not active. You must select the sheet first, then the cell. E.g., Worksheets("Sheet2").Select Range("A10").Select or Dim Rng As Range Set Rng= Worksheets("Sheet1").Range("A10") Rng.Worksheet.Select Rng.Select As an alternative, you can use Application.Goto: Dim Rng As Range Set Rng = Worksheets("Sheet1").Range("A10") Application.Goto Rng, True -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "elaine" wrote in message ps.com... Can anyone tell me why doesn't work: Range(Sheets("Word Analysis").Range("A2"), Sheets("KeyWord Analysis").Range("A2").End(xlDown)).EntireRow.Sele ct when this does: Range(Sheets("Word Analysis").Range("A2"), Sheets("KeyWord Analysis").Range("A2").End(xlDown)).EntireRow.Dele te shift:=xlUp I just want to select a cell on a different sheet! it keeps giving me this error code: Runtime error '1004': Select method of Range class failed I just want to select a cell on a different sheet! I cant even get a basic reference like: Worksheets("Keyword").Range("A1").Select to work unless I am already on the "Keyword" worksheet. Thanks. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the first example you are selecting something. In the 2nd, you are not.
To select something, the sheet must be active. No need to select the range anyway. I think you want something like: With WorkSheets("Word Analysis") .Range(.Range("A2"), .Range("A2").End(xlDown)).Copy Destination:=WorkSheets("??").Range("A2") End With "elaine" wrote in message ps.com... Can anyone tell me why doesn't work: Range(Sheets("Word Analysis").Range("A2"), Sheets("KeyWord Analysis").Range("A2").End(xlDown)).EntireRow.Sele ct when this does: Range(Sheets("Word Analysis").Range("A2"), Sheets("KeyWord Analysis").Range("A2").End(xlDown)).EntireRow.Dele te shift:=xlUp I just want to select a cell on a different sheet! it keeps giving me this error code: Runtime error '1004': Select method of Range class failed I just want to select a cell on a different sheet! I cant even get a basic reference like: Worksheets("Keyword").Range("A1").Select to work unless I am already on the "Keyword" worksheet. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting in a Pivot Table unselected fields | Excel Worksheet Functions | |||
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON | Excel Programming | |||
Delete Unselected Rows | Excel Discussion (Misc queries) | |||
Select last cell in range | Excel Programming | |||
how to delete unselected columns in a table, thanks | Excel Programming |