Workbook.Paste
Use this function to paste a document into the workbook.
Syntax | Parameters | Return value |
---|---|---|
Sub Workbook.Paste( _ Optional Placement As WorkbookPlacement = scWorkbookDefaultPlacement) |
Placement [in, optional]
Integer value specifying how to place the file into the workbook. Type: Default value: |
This function does not return a value. |
SVB Example
Pasting a spreadsheet into a workbook
Option Base 1 Option Explicit Sub Main Dim wb As Workbook 'assigns the new workbook to the object wb Set wb = Workbooks.New("WB Example") Dim spr As Spreadsheet Set spr = Spreadsheets.Open(Path & "\examples\datasets\adstudy.sta") 'copies the spreadsheet spr.Copy 'pastes the copied spreadsheet into the workbook as the first child wb.Paste(scWorkbookFirstChild) 'sets the workbook to visible wb.Visible = True End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.