Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My user will select a range of cells in Sheet1 then I need some code that will:
1. Activate Sheet2 2. Select the same range of cells in Sheet2 that the user selected in Sheet1 Thanks in advance -- Gary's Student |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Application.GoTo Sheets("Sheet2").Range(Selection.Address) In article , Gary''s Student wrote: My user will select a range of cells in Sheet1 then I need some code that will: 1. Activate Sheet2 2. Select the same range of cells in Sheet2 that the user selected in Sheet1 Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gary's Student,
Dim myRange As Range Set myRange = Selection Worksheets("Sheet2").Activate Range(myRange.Address).Select Or, to do it within a running macro: Dim myRange As Range 'Other code here Set myRange = Application.InputBox("Select Cells", , , , , , , 8) Worksheets("Sheet2").Activate Range(myRange.Address).Select HTH, Bernie MS Excel MVP "Gary''s Student" wrote in message ... My user will select a range of cells in Sheet1 then I need some code that will: 1. Activate Sheet2 2. Select the same range of cells in Sheet2 that the user selected in Sheet1 Thanks in advance -- Gary's Student |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you both very much
-- Gary's Student "Bernie Deitrick" wrote: Gary's Student, Dim myRange As Range Set myRange = Selection Worksheets("Sheet2").Activate Range(myRange.Address).Select Or, to do it within a running macro: Dim myRange As Range 'Other code here Set myRange = Application.InputBox("Select Cells", , , , , , , 8) Worksheets("Sheet2").Activate Range(myRange.Address).Select HTH, Bernie MS Excel MVP "Gary''s Student" wrote in message ... My user will select a range of cells in Sheet1 then I need some code that will: 1. Activate Sheet2 2. Select the same range of cells in Sheet2 that the user selected in Sheet1 Thanks in advance -- Gary's Student |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select used range | Excel Worksheet Functions | |||
How can change range to select active rows instead of :=Range("S10 | Excel Discussion (Misc queries) | |||
When entering data into a range of cells, select the entire range. | Excel Discussion (Misc queries) | |||
VBA Range select | Excel Programming | |||
Select Sheet then Select Range | Excel Programming |