粘贴与膏特殊 [英] Paste vs PasteSpecial

查看:112
本文介绍了粘贴与膏特殊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过两个小时的无效搜寻和沮丧。我在这里发布问题。



任何人都可以在excel vba中解释粘贴和特殊选项之间的详细区别?




解决方案

这很简单:




粘贴将完全粘贴原始范围内的内容(简单说明:值或公式)






PasteSpecial 可让您定义要粘贴的内容(值,公式,样式等)。



With:

 表达式.PasteSpecial(粘贴,操作,SkipBlanks ,转置)

第一个参数粘贴 XlPasteType枚举类型,用于确定您可以选择的内容






进一步阅读:



MSDN Range.PasteSpecial方法



< a href =https://blog.udemy.com/pastespecial-vba/ =noreferrer> PasteSpecial VBA命令:获取VBA为您做的努力


After two hours of futile search and frustration. I am posting the question here.

Can anyone please explain the detailed difference between paste and pastespecial option in excel vba?

Or cite some resources which can help

解决方案

That's simple :


Paste will paste exactly what's in the origin range (to make it simple: values or formulas)


PasteSpecial let you define what you want to paste (value, formula, style, etc..).

With:

expression .PasteSpecial(Paste, Operation, SkipBlanks, Transpose)

The first argument Paste is of XlPasteType Enumeration type that determines what you can choose


Some further read:

MSDN Range.PasteSpecial Method

The PasteSpecial VBA Command: Get VBA to Do the Hard Work for You

这篇关于粘贴与膏特殊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆