VBA ·í2Ó±ø¥ó¤@¼Ë®É¡A¦Û°Ê´M§ä¿é¤J 2
- ©«¤l
- 169
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-17
|
VBA ·í2Ó±ø¥ó¤@¼Ë®É¡A¦Û°Ê´M§ä¿é¤J 2
·í¤u§@ªí¤W¦³"¨®½ø½s¸¹"A201603030015©M"¥q¾÷(1)"¶ÂªQ©M"¥q¾÷(2)"¶ÂªQ®É¡A³o¥Nªí¥L¤w¸g°e³f¦^¨Ó¤F¡A¦ý¦]¬°¥L¦b¤£¦P¼Ëªº®É¶¡¤S¥X¥h°e³f¡A©Ò¥HÁÙn¦A¦¸¿é¤J"¨®½ø½s¸¹"A201603030015©M"¥q¾÷(1)"¶ÂªQ¡A³oÓ¸ê®ÆÁÙn¨Ì§Ç¦bAÄæ©MBÄæ¤WÂà¼g¡A·í¥L¤S°e³f§¹¦^¨Ó®É¡A¤Sn¦^¨ì¥u¯à¦bCÄæ²£¥ÍBÄæ¹ïÀ³ªº¸ê®Æ¡A(·s¼WFÄ欰TextBox3 ©Ò¶ñ¤Jªº¸ê®Æ)¤]¸òµÛ¦^¨®¿é¤J¶i¥h¡A³Â·Ð¦Ñ®v¦b¶O¤ß¤F¡AÁÂÁÂ!
ÂÐÀÉ:
20160331.rar (26.25 KB)
|
|
|
|
|
|
|
- ©«¤l
- 169
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-17
|
¦^´_ 2# luhpro
·PÁÂluhpro¦Ñ®vªºµªÂСA§¹¬ü¦n¹ê¥Î¡A¯uªº«ÜÁÂÁÂ! |
|
|
|
|
|
|
- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2016-4-2 23:58 ½s¿è
¦^´_ 1# man65boy
[Module]- Public lRows&
- Public vDIO, vDPeo
½Æ»s¥N½X [Sheet ¥D¶]- Private Sub cbInput_Click()
- UserForm1.Show
- End Sub
½Æ»s¥N½X [ThisWorkbook]- Private Sub Workbook_Open()
- Dim lRow&
- Dim sStr$
-
- Set vDIO = CreateObject("Scripting.Dictionary")
- Set vDPeo = CreateObject("Scripting.Dictionary")
- lRow = 2
- While Cells(lRow, 1) <> ""
- If Cells(lRow, 3) = "" Then
- sStr = "O"
- Else
- sStr = "I"
- End If
- vDIO(CStr(Cells(lRow, 1) & "-" & Cells(lRow, 2))) = sStr
- vDPeo(CStr(Cells(lRow, 1) & "-" & Cells(lRow, 2))) = lRow
- lRow = lRow + 1
- Wend
- lRows = lRow - 1
- End Sub
½Æ»s¥N½X [UserForm]- Private Sub CommandButton1_Click()
- Dim lRow&
-
- If TextBox1 = "" Then
- MsgBox "§A¥²¶·¿é¤J (¨®½ø½s¸¹)"
- Exit Sub
- End If
-
- If TextBox2 = "" Then
- MsgBox "§A¥²¶·¿é¤J (¥q¾÷¤Hû)"
- Exit Sub
- End If
-
- lRow = vDPeo(CStr(TextBox1 & "-" & TextBox2))
- If vDIO(CStr(TextBox1 & "-" & TextBox2)) = "O" Then ' ¦^¨Ó¤F
- Cells(lRow, 3) = TextBox2
- Cells(lRow, 5) = Now
- Cells(lRow, 6) = ComboBox1.Text
- vDIO(CStr(TextBox1 & "-" & TextBox2)) = "I"
- Else ' §Y±N¥~¥X
- lRows = lRows + 1
- Cells(lRows, 1) = TextBox1
- Cells(lRows, 2) = TextBox2
- Cells(lRows, 4) = Now
- vDIO(CStr(TextBox1 & "-" & TextBox2)) = "O"
- vDPeo(CStr(TextBox1 & "-" & TextBox2)) = lRows
- End If
- End Sub
- Private Sub UserForm_Initialize()
- ComboBox1.AddItem "NO"
- ComboBox1.AddItem "Yes"
- ComboBox1.ListIndex = 0
- End Sub
½Æ»s¥N½X ½Ð¯d·N : ¥D¶ ªº ¿é¤J«ö¶s §Ú¦³««Ø¦¨ cbInput «ö¶sª«¥ó
20160331-A.zip (24.93 KB)
|
|
|
|
|
|
|