1, first we open a work sample table as an example.
2, the Copy method is the Excel worksheet Copy command, use the mouse to select cells or range cells, and then select the Copy command in the mouse mail panel, or use the CTRL + C key combination.
3, we use the ALT+F11 combination shortcut key into the VBE editor, insert a new module, and enter the following code in the module:
Option Explicit
Sub Cy ()
Sheets (1). Range ("A1"). Copy
End Sub
4, here first to enter the object sheet, specify a correct worksheet. Sheets (1) is the May payroll form, and the Range property is exactly the cell or range of cells selected by the mouse.
5. Here we have a copy method for the A1 cell of the May wage-object worksheet, which is to save the cell's data in memory. is equivalent to the commands in Excel. If you need to paste, you need to specify the cell object and use the Pastaspecial method to paste it.
6, of course, the use of paste method, very accurate, but also caused a part of the use of inconvenience, because the paste method requires a variety of parameters. If you just copy the value, then we can simply use a simple method to enter the target cell or range directly as a copy parameter. For example sheets (1). Range ("B7"). Copy Sheets (1). Range ("B20")