Copy Shapes and paste it into another worksheet vba

  vba codes is

Dim ws As Worksheet

Set ws = Sheets.Add

Sheets("SearchData").Activate

ActiveSheet.Shapes("Rectangle 1").Select

Selection.Copy

ws.Paste

Here SearchData has a shape named as "Rectangle 1". To copy it Step1. You need to Activate the worksheet then Copy. Here ws is a new worksheet. To copy the range of a worksheet and to paste into another worksheet. vba codes are follow

Sheets("Database").Range("A1:E1").Copy ws.Range("A1")

No comments:

Post a Comment