- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 13
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-10-25
|
luhpro¤j¤j¯u¬O°ª©Û¤p§Ì¥Ì«ô¤U·ÁÂÁÂ@¤ß«ü¾É¤p§Ì¥i§_¦A°Ý¤@ÃD¦p¤U¦C
Private Sub Worksheet_SelectionCha ...
gca78000 µoªí©ó 2014-11-7 19:27
???
¬Ý§A¥Î Target.Address §Ú²q¬On¹ï¬Y¨ÇÀx¦s®æ°µ³B²z,
¦ý§A¼gªº : a3-a7+e3e7+g3-g7+i3-i7+k3-k7+m3-m7 ©Ç©Çªº.
e3e7 ¬OþÓ(©Îþ¨Ç) Àx¦s®æ¦ì§}ªºªí¥Ü¤è¦¡?
©Î¬On¥Î e3:e7 (½d³òÀx¦s®æ)¶Ü?
¥t a3-a7... ¤S¥[¤S´îªº,
¬On¹ïÀx¦s®æ¤º®e°µpºâ,
ÁÙ¬On¹ïÀx¦s®æ¦ì§}§@¼W´î?
§Ú²q´ú§A¥i¯à¬On·íÂIÀ»¤F :
a3,a7,e3,e7,g3,g7,i3,i7,k3,k7,m3,m7
µ¥Àx¦s®æ´NnÅã¥ÜUserForm1.
Y¬O³o¼Ë§ÚÌ¥i¥H¥ýÂk¯Ç³o¨ÇÀx¦s®æ¦ì§}ªº³W«ß:
1. ³£¸¨¦b²Ä 3 ¦C»P²Ä 7 ¦C -> ¦Cªºªí¥Ü¤è¦¡¬° Range.Row.
³o¼Ë¥un¤@¦æ :
If Target.Row=3 Or Target.Row=7 Then
´N¯à¹ê²{.
2. Äæ§Ç¤À§O¬° a,e,g,i,k,m ³o 6 Äæ,«h¥Î :
If Target.Column=1 Or Target.Column=5 Or Target.Column=7 Or Target.Column=9 Or Target.Column=11Or Target.Column=13 Then
¨Ó¹ê²{.
¦ý³o¼Ë¼gµ{¦¡½X¤Óªø¤F,
¹ï©ó«D³sÄò©Î¤£¨ã³W«ß©Ê¦h²Õ¼Æ¦rªº§PÂ_¥i¥H¥Î
Select Case Target.Column
Case 1,5,7,9,11,13
...
end select
¨Ó¹ê²{,
¦n³B¬O¬üÆ[, ¨ãµ²ºc©Ê©ö°£¿ù¤ÎºûÅ@.
ºî¤W©Òzµ{¦¡¥i¥Hקï¦p¤U:- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim bShow As Boolean
-
- bShow = False
- With Target
- If .Row = 3 Or .Row = 7 Then
- Select Case .Column
- Case 1, 5, 7, 9, 11, 13
- bShow = True
- End Select
- End If
- End With
- If bShow Then UserForm1.Show
- End Sub
½Æ»s¥N½X |
|