作者triste (麦肯锡之梦)
看板Visual_Basic
标题[VBA ] Active control checkbox & Event
时间Tue May 26 14:21:26 2009
我制作了一堆Checkbox(active control), word2007.
我希望每一个物件被人勾选时,就会换颜色
http://picasaweb.google.com.tw/superluckybear/Techpic#5339811305061641874
Word => design mode => properties => XXX check box
where XXX is the object name of checkbox (Active control)
每一个click event内容
With me.XXX
If .value = ture then
.backcolor = "%HoooFF" (乱打即颜色编码)
else
.backcolore = blah
end if
end with
问题在於当我有十几个click event时,我想写一个副程
让每一个click event去呼叫就好,但上面写法,我必需手动每个去抓不同的XXX物件名
所以问题变成
一、VBA 有没有办法抓subroutine/funtion name
二、关於control object check box变颜色,除了上述有别的更简单的写法吗
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 66.183.177.148