calling from one worksheet sheet to source from another
Read Joel's instructions again and try it with the With/end with structure.
And it wouldn't hurt to specify the workbook if sheets("sheet1") isn't in the
activeworkbook.
SteveDB1 wrote:
Hi.
I want to link two worksheets together. These are within the same workbook.
How would I link two worksheets within the same workbook?
I tried the :
set MyRngPer = Sheets("Sheet1").Range(Cells(NuB, NuA), Cells(NuC, NuA))
MyRngPer.select
and it did not work.
Do I need to include the workbook name?
"Joel" wrote:
I just noticed something else. Excel has problem remebering that the Range
and Cell in the statement below are on the same worksheets. You need to do
something like this. Notice I have three dots (before range and cells)
with newbk.sheets("Sheet1")
set MyRngPer = .Range(.Cells(NuB, NuA), .Cells(NuC, NuA))
end with
"SteveDB1" wrote:
Hello.
I'm working on a macro to link two worksheets.
I've written something that appears to work, but when I went to test it I
found that it picks the range on the primary worksheet.
I need to have it select the range on the secondary worksheet.
E.g.,
MyRngPer = Range(Cells(NuB, NuA), Cells(NuC, NuA)).Select
Where the NuA, NuB, and NuC are variables I've dim'd, and input through an
input box.
How do I get the MyRngPer to select the range desired from another worksheet?
Thank you.
--
Dave Peterson
|