大侠们怎样用VBA‘批量’朝X或Y 方向复制某个图形,哪位大侠能帮帮忙。小弟感激不尽
大侠们怎样用VBA‘批量’朝X或Y 方向复制某个图形,哪位大侠能帮帮忙。小弟感激不尽!!!!<p><font face="Verdana">怎样用VBA实现‘批量’朝X或Y 方向复制某个图形,哪位大侠能帮帮忙。小弟感激不尽!!!!</font></p><p>急用,老师叫我们搞毕业设计,以前都没学过VBA,弄不来。</p>
<p>希望有人帮帮忙!!!!</p> 联系我QQ534206572 <p>阵列 核心代码如下:</p>
<p> </p>
<p>先要设置Set lineobj和Set lineobj1(即画线) 然后,</p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana">'偏移直线<br/> Dim offsetobj As Variant<br/> <br/> offset = 4500<br/> </font><font style="BACKGROUND-COLOR: #ffffff" face="Verdana"> offsetobj = lineobj1.offset(offset)<br/> </font><font style="BACKGROUND-COLOR: #ffffff" face="Verdana"> '定义矩形阵列<br/> Dim numberofrows As Long<br/> Dim numberofcolumns As Long<br/> Dim numberoflevels As Long<br/> Dim distancebwtnrows As Double<br/> Dim distancebwtncolumns As Double<br/> Dim distancebwtnlevels As Double<br/> numberofrows = 4<br/> numberofcolumns = 4</font></p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana"> numberoflevels = 1<br/> distancebwtnrows = 4</font></p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana"> distancebwtncolumns = 4</font></p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana"> distancebwtnlevels = 1<br/> '创建对象阵列<br/> Dim retobj As Variant<br/> <br/> retobj = lineobj.ArrayRectangular(numberofrows, 1, 1, distancebwtnrows, 1, 1)<br/> retobj = lineobj1.ArrayRectangular(1, numberofcolumns, 1, 1, distancebwtncolumns, 1)<br/><br/> <br/> ZoomAll</font></p>
页:
[1]