Hi All
Getting stuck on the complicated coding I can accept but overcoming what should be simple problem to solve seems
to take a disproportionate amount of time.
All I am doing is copying and pasting the values from a range in one worksheet to the same sized range in another worksheet.
The range Worksheets("Results").Range("A1:A10") is still selected after the the code is run.
How does one get around this problem?
I can select another cell, A1 on 'Results' for example, but I can only do that if the 'Results' worksheet is active. Is there a way to do this
without making the 'Results' worksheet active?
I can set a range object to each of the source and target ranges and assign the values of the source range to the target range.
But is this a good / acceptable way of doing the same thing? There seems to be few recommendations of this technique online.
Thanks for any help that you can give me.
Getting stuck on the complicated coding I can accept but overcoming what should be simple problem to solve seems
to take a disproportionate amount of time.
All I am doing is copying and pasting the values from a range in one worksheet to the same sized range in another worksheet.
VBA Code:
Worksheets("Results").Range("A1:A10").Copy Worksheets("Temp").Range("D1:D10")
Application.CutCopyMode = False
The range Worksheets("Results").Range("A1:A10") is still selected after the the code is run.
How does one get around this problem?
I can select another cell, A1 on 'Results' for example, but I can only do that if the 'Results' worksheet is active. Is there a way to do this
without making the 'Results' worksheet active?
I can set a range object to each of the source and target ranges and assign the values of the source range to the target range.
VBA Code:
Dim rngSourceRange As Range
Dim rngTargetRange As Range
Set rngSourceRange = WsResults.Range("A1:A10")
Set rngTargetRange = Worksheets("Temp").Range("D1").Resize(rngSourceRange.Rows.Count, 1)
rngTargetRange = rngSourceRange
But is this a good / acceptable way of doing the same thing? There seems to be few recommendations of this technique online.
Thanks for any help that you can give me.