- ©«¤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 ©ó 2014-8-23 09:52 ½s¿è
¤p§Ì¦Aªþ¤WÀÉ®× ,
¦bitemÄæ¦ì ,¦p§ï¥H ¼Æ¦r ®æ¦¡ªº °ê»Ú±ø½X.
1.µLªk§@¤ñ¹ï ,
2.¬Û¦P¦btextbox2, ...
melvinhsu µoªí©ó 2014-8-21 09:52
°ÝÃD1 :
¨º¬O¦]¬°
Cells(lRow, 1) ¤º¬O¬O¼Æ¦r,
¦Ó TextBox2 ¤º¬O¤å¦r.
§Y«K¬Ý¨ìªº³£¬O¤@¼Ëªº¦r,
¦ý¨âªÌªº§ÎºA¤£¦P,
©Ò¥H Cells(lRow, 1) = TextBox2 ªº¸ê®Æ¤ñ¹ï·|¤£¦¨¥\.
¥un¦b Cells(lRow, 1) ¥~¥[¤W CStr () §â¥¦¥ýÂন¤å¦r´N¥i¥H¤ñ¹ï¦¨¥\¤F.
°ÝÃD2:
¦]¬° Sub TextBox2_Change µ{§Ç¹ê»Ú¤W¬O¨C¦¸¤º®eµo¥ÍÅÜ°Ê(¨Ò¦p¿é¤J 1 Ó¦r)´N·|°õ¦æ 1 ¦¸,
©Ò¥H If Label3 = "" Then MsgBox "§ä¤£¨ì¸ê®Æ" ³o¤@¦æ°T®§·|¤@ª½¥X²{(³y¦¨ scanner scan¸ê®Æ¿é¤J¤¤Â_, «áÄò¸ê®Æ¶i¤£¨Ó),
¥un®³±¼§Y¥i.
¥t, Range ªº Copy «ü¥O¨Ï¥Î®É,
Y¥u¦³«ü©w Destination ¦ÓµL¨ä¥L¯S®í»Ý¨D,
«h Destination:= ¥i¥H¤£¥Î¦C¥X¨Ó,
¥un¥´ Cells(2, 8).Copy Cells(3, 8) §Y¥i.
«á¨Ó§Úµo²{ Label3 ¥X²{¤å¦r(§Y¤ñ¹ï¦¨¥\)ªº²{¶H«Ü¤£©úÅã,
©Ò¥H§Ú¥[¤W·í¨ä¤º®e¥X²{¤å¦r®É,
©³¦â·|ÅܲLºñ¦â,
¤Ï¤§´N«ì´_¦¨¥Õ¦â
³o¼Ë¤ñ¹ïµ²ªG´N·|©úÅã¦h¤F.
ºî¤W©Òzµ{¦¡×§ï¦p¤U:- Private Sub TextBox2_Change()
- Cells(2, 8).Copy Cells(3, 8)
-
- Dim lRow&
- Dim dItm
-
- Label3 = ""
- lRow = 2
- Do While Cells(lRow, 1) <> ""
- If CStr(Cells(lRow, 1)) = TextBox2 Then
- With Label3
- .Caption = Cells(lRow, 3)
- .BackColor = &HC0FFC0
- End With
- Set rTar = Cells(lRow, 1)
- Exit Do
- Else
- Label3.BackColor = &H80000005
- End If
- lRow = lRow + 1
- Loop
- End Sub
½Æ»s¥N½X |
|