Should be a simple question:
I have the following script which pastes data:
Dim a As Range
Set a = Selection
Selection.Cut
Range("C1:I1").End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste
Upon pasting, the ActiveSheet moves to the cell in which its pasting in. How do I re-focus on the cell from which the data was cut?
I want to put the focus on the Range that is currently held in the ‘A’ variable.
I tried this:
a.Select
And
a.Activate
but, it doesn’t actually move the activeSheet to the correct area; it just selects it.
What you seem to want can be accomplished in a single line:
A single space after the cut keyword means the destination follows.
There’s no need to Dim or Set a, as you’re not even using a as a variable in your code.
Doing it this way does not use the clipboard, change the position of the cursor or page location.