在Excel VBA中插入CopyOrigin [英] CopyOrigin on Insert in Excel VBA

查看:970
本文介绍了在Excel VBA中插入CopyOrigin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我插入的CopyOrigin参数是什么?
它将接受什么价值?

Can anyone tell me what the CopyOrigin parameter of Insert is used for? And what values it will accept?

我已经包括了vba帮助(这不是很有帮助):

I have included the vba help (which wasn't really that helpful):


将单元格或单元格范围
插入到工作表或宏表单中,
将其他单元格移开以腾出空间。

Inserts a cell or a range of cells into the worksheet or macro sheet and shifts other cells away to make space.

expression.Insert(Shift,CopyOrigin)
expression必需。一个表达式
返回一个Range对象。

expression.Insert(Shift, CopyOrigin) expression Required. An expression that returns a Range object.

Shift可选变体。指定
可以移动单元格。可以是
以下
XlInsertShiftDirection常量之一:
xlShiftToRight或xlShiftDown。如果省略此
参数,Microsoft Excel
将根据
范围的形状来确定。

Shift Optional Variant. Specifies which way to shift the cells. Can be one of the following XlInsertShiftDirection constants: xlShiftToRight or xlShiftDown. If this argument is omitted, Microsoft Excel decides based on the shape of the range.

CopyOrigin可选变体。
复制来源。

CopyOrigin Optional Variant. The copy origin.


推荐答案

需要以下一个参数。

Const xlFormatFromLeftOrAbove = 0

Member of Excel.XlInsertFormatOrigin

和...

Const xlFormatFromRightOrBelow = 1

Member of Excel.XlInsertFormatOrigin

这篇关于在Excel VBA中插入CopyOrigin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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