我製作了一堆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