command button to move data

  • Thread starter Thread starter dummy
  • Start date Start date
D

dummy

If it's possible, I would like to use a command button or checkbox to
trigger moving data from cells in a column (b34-b41) on one worksheet to the
next available ROW on another worksheet.
Thanks in advance.
 
use the macro below and assign it to any picture or text box

Sub Macro1()

Sheets("Sheet1").Select
Range("B34:B41").Select
Selection.Copy

Sheets("Sheet2").Select
Range("A65536").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True

Sheets("Sheet1").Select
Range("B34:B41").Select
Application.CutCopyMode = False
Selection.ClearContents

End Sub
 
Bill Kuunders said:
use the macro below and assign it to any picture or text box

Sub Macro1()

Sheets("Sheet1").Select
Range("B34:B41").Select
Selection.Copy

Sheets("Sheet2").Select
Range("A65536").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True

Sheets("Sheet1").Select
Range("B34:B41").Select
Application.CutCopyMode = False
Selection.ClearContents

End Sub




.
I am getting a syntax error which is highlighting the pastespecial portion of the code.
 
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= False, Transpose:=True

all of this needs to be on one line. without the underscore _

Regards
Bill
 
Back
Top