Hi, I am trying to add a code to my document that after selecting a range with my mouse will move/cut the selection and move it to the next column to the right by an increment of 1.
The selection I have is I.e. C8:C11 which is coloured Red. After clicking a button I want the selection to move right each time, so i.e. D8:D11. Ideally I want the previous cells to remain the background colour (green) after cutting its cells.
Code I have right now, which doesn't work is:
The selection I have is I.e. C8:C11 which is coloured Red. After clicking a button I want the selection to move right each time, so i.e. D8:D11. Ideally I want the previous cells to remain the background colour (green) after cutting its cells.
Code I have right now, which doesn't work is:
VBA Code:
private sub commandbutton1_commandbutton1_click()
Dim myRange as Range
set myRange = selection
Selection.copy myRange.Offset(0,1).select
End sub