[英]Excel VBA to copy entire sheet and past as values
我需要創建一個VBA語句,該語句將復制整個活動工作表,然后將其粘貼為值-看起來很簡單,但我對VBA並不熟悉-它實質上是自動執行左上角的“單擊”並復制->粘貼為值。 這是我正在嘗試的:
Sub CopyPasteSheetAsValues()
'Copy and Paste Summary Sheet as Values
Sheets("Summary Build").Cells.Copy
Sheets("Summary Build").Cells.PasteSpecial Paste:=xlPasteValue
End Sub
您在xlPasteValues中錯過了s。 另外,最好添加Application.CutCopyMode = False以避免復制區域周圍的行進螞蟻。
Sub CopyPasteSheetAsValues()
'Copy and Paste Summary Sheet as Values
Sheets("Summary Build").Cells.Copy
Sheets("Summary Build").Cells.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.