- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 15
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-12
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2015-6-11 23:43 ½s¿è
·Q½Ð°Ý¦U¦ì¤j¤j
§Ú²{¦b·Qn§Q¥Îªí³æ¨Ó¿z¿ï¸ê®Æ
¤U©Ô¦¡¿ï¾Ü¸ê®ÆÁÙ¥i¥H°õ¦æ
¦ý¦pªG·Qn§Q¥Î¤Ä¿ï¸ê®Æªº¤è ...
Jared µoªí©ó 2015-6-8 16:44
¬Ý°_¨Ó¦Û°Ê¿z¿ï¦P¤@Äæ¦n¹³¤£¯à¦P®Éº¡¨¬¶W¹L¤@Ó±ø¥ó. (§Y¤£¯à¦b¦P¤@Ä椤¦P®ÉÅã¥Ü¥X¨Ó¤pµØ»P¤p©ú)
©Ò¥H§Ú³o¸Ì±Ä¥Î³v¦C¿z¿ï,
¥¼¯à¦P®Éº¡¨¬©Ò¦³±ø¥óªº¦C«h±N¨äÁôÂÃ,
¯d¤Uªº´N¬O§ÚÌnªº¸ê®Æ¤F.
¤]¦]¬°±Ä¥Îªº¬OÁôÂæCªº¤è¦¡,
©Ò¥H "«ö¶s1" ¦ì¸mn¤W²¾¨ì ²Ä 1 ¦C ¥H§K³QÁôÂæӵLªkÂI¿ï.
º¥ý, ¦]À³µ{¦¡½Õ¾ã, ¥þ°ìÅܼƪº«Å§i¤º®e¤]°µ½Õ¾ã:"¿z¿ï±ø¥ó" «ö¶sµ{¦¡×§ï¦p¤U:- Private Sub CommandButton1_Click() '¿z¿ï±ø¥ó
- ActiveSheet.Rows.Hidden = False
- a = Test.ComboBox1.Value '©u¸`
- b = Test.ComboBox2.Value '¤ë¥÷
- s = ""
- s = s & IIf(CheckBox1, CheckBox1.Caption & ",", "")
- s = s & IIf(CheckBox2, CheckBox2.Caption & ",", "")
- s = s & IIf(CheckBox3, CheckBox3.Caption & ",", "")
- s = s & IIf(CheckBox4, CheckBox4.Caption & ",", "")
- s = s & IIf(CheckBox5, CheckBox5.Caption & ",", "")
- s = s & IIf(CheckBox6, CheckBox6.Caption & ",", "")
- s = s & IIf(CheckBox7, CheckBox7.Caption & ",", "")
- s = s & IIf(CheckBox8, CheckBox8.Caption & ",", "")
- s = s & IIf(CheckBox9, CheckBox9.Caption & ",", "")
- s = s & IIf(CheckBox10, CheckBox10.Caption & ",", "")
- lRow = 2
- With ActiveSheet
- While .Cells(lRow, 1) <> ""
- If Not (.Cells(lRow, 1) = a And .Cells(lRow, 2) = b And _
- InStr(1, s, .Cells(lRow, 3)) <> 0) Then .Rows(lRow).Hidden = True
- lRow = lRow + 1
- Wend
- End With
- End Sub
½Æ»s¥N½X "²M°£¤º®e" «ö¶sµ{¦¡¤¤,
CheckBox ªºÈ¦b¦¹¤£¯à³]¬° "" ¦ÓÀ³³]¬° False ©Î true ,
¥t¥~¬JµM¿z¿ïªº±ø¥ó¤w¸g³Q²M°£¤F,
¿z¿ïµ²ªG¦ÛµMÀ³¸Ó¤@¨Ö°µÁÙì.
¬Gקï¦p¤U:- Private Sub CommandButton2_Click() '²M°£¤º®e
- Me.ComboBox1 = ""
- Me.ComboBox2 = ""
- Me.CheckBox1 = False
- Me.CheckBox2 = False
- Me.CheckBox3 = False
- Me.CheckBox4 = False
- Me.CheckBox5 = False
- Me.CheckBox6 = False
- Me.CheckBox7 = False
- Me.CheckBox8 = False
- Me.CheckBox9 = False
- Me.CheckBox10 = False
- ActiveSheet.Rows.Hidden = False
- End Sub
½Æ»s¥N½X "®i¶}" «ö¶sµ{¦¡¤]n¸òµÛ°µ½Õ¾ã:- Private Sub CommandButton4_Click() '®i¶}
- ActiveSheet.Rows.Hidden = False
- End Sub
½Æ»s¥N½X ¥t¥~§AªºÀÉ®× ComboBox2.List ¤º®e¨Ã¤£¯à»P B Äæ¹ïÀ³, (¨Ò¦p : "¤@" ¤£¯à¹ïÀ³ "¤@¤ë"),
¦P®É¥i¥H¦Ò¼{¤@¨Ö³£½á»PªìÈ,
©Ò¥H§Ú°µ¤F¥H¤Uªº×§ï:- Private Sub UserForm_Initialize()
- With ComboBox1
- .List = Array("Q1", "Q2", "Q3", "Q4") '©u
- .Value = "Q1"
- End With
- With ComboBox2
- .List = Array("¤@", "¤G", "¤T") '¤ë
- .Value = "¤@"
- End With
- End Sub
½Æ»s¥N½X ³Ì«á Q1 ¤£·|¦³ "¤@","¤G","¤T" ¥H¥~ªº¤ë¥÷,
¬G¥i¥H¦bÅܧó ComboBox1 ¤º®e®É¤@¨Ö§â ComboBox2 ªº¿ï³æ½Õ¾ã¦n:- Private Sub ComboBox1_Change()
- Select Case ComboBox1
-
- Case "Q1"
- ComboBox2.List = Array("¤@", "¤G", "¤T") '¤ë
-
- Case "Q2"
- ComboBox2.List = Array("¥|", "¤", "¤»") '¤ë
-
- Case "Q3"
- ComboBox2.List = Array("¤C", "¤K", "¤E") '¤ë
-
- Case "Q4"
- ComboBox2.List = Array("¤Q", "¤Q¤@", "¤Q¤G") '¤ë
- End Select
-
- End Sub
½Æ»s¥N½X ·íµM, µ{¦¡ÁÙ¦³Â²¤ÆªºªÅ¶¡,
¥B CheckBox ¤]¥i¥H¦Ò¼{°µª«¥ó°}¦C,
¤£¹L¦]¬°µ{¦¡¨Ã¤£½ÆÂø,
©Ò¥H³o³¡¥÷§Ú´N¥ý¤£¦Ò¼{¤F.
´ú¸Õ-a.zip (18.13 KB)
|
|