- 帖子
- 15
- 主題
- 3
- 精華
- 0
- 積分
- 30
- 點名
- 0
- 作業系統
- win7
- 軟體版本
- 2010
- 閱讀權限
- 10
- 註冊時間
- 2014-5-29
- 最後登錄
- 2015-10-23
|
3#
倒序看帖
發表於 2015-9-28 08:49
| 只看該作者
[發問] 讓每次新產生的Shape.name 能以順序命名
Hi 高手們,疑問如下, 當按下Button時, 會一次讀取這15個欄位並同時產生15個shape, 而我須要分別命名1A、2A....到15A, 而當我清除這15個shape之後, 再次重新產生15個Shape 時, 名稱也是一樣是從1A.、2A.到15A... 請高手指導一下. 謝謝.
Private Sub commandbutton
pos=15
for index 3 to 7
for indexb = 6 to 10
dim second as double
second=val(cells(index + 1, indexb).value)
dim text as string
text=cells(index,indexb).value
call drwa(second,text,pos)
next
next
end sub
Public sub------------
activesheet.shapes.addshape(msoshaperectangle,shape_left,shape_top,sec*5.1,30).select
selection.name="1A" |
|