Set Rng = Range("S2:S293")
When you set the Rng variable the first time, include the sheet reference and
it will apply throughout the code to that sheet:
Set Rng = Sheets("Sheet1").Range("S2:S293")
Now anytime you use Rng it applies to Sheet 1.
"Fan924" wrote:
Sub DataSave()
Dim Rng As Range
Set Rng = Range("S2:S293")
Sheets("Sheet1").Range("C" & Range("A1")).Resize
(Rng.Cells.Count).Value = Rng.Value
Beep
End Sub
Thanks to your help, this is working nicely.
Trying something new, I am on Sheet2 and I would like to use
Set Rng = Range("S2:S293")
to select cells on Sheet1 and copy to sheet2.
|