ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Ãö©óIF ¦h±ø¥ó¤U °ÝÃD

[µo°Ý] Ãö©óIF ¦h±ø¥ó¤U °ÝÃD

§Ú¦bºô¤WªF§ä¦è´M¼g¦n¤F¤@­Ó¤½¥q¨«³f¥ÎªºEXCEL
¦ý¦³®É­Ô¦n¹³·|¨S¦³¦^À³

¼È®Éµo²{¤F°ÝÃDªº¦³¨â­Ó

1 ,  ¨Ï¥Î¹p®gºj¦b SI ¤è®æ¿é¤J«á¤£À´¸õ¨ìBAR CODE®æ
2 , ¦bBAR CODE¦æ¿é¤J«ö¤UENTER¨S¦³°õ¦æADD / ERRORADD

§Ú³]©wªº±ø¥ó¬O

1  , ¨â®æ³£­n¦³10­Ó¦r , ¤è¥i°õ¦æ ADD
2 , ¦bSI®æ¨S¦³¸ê®Æ®É , BAR CODE¿é¤J¦r®É¦Û°Ê¸õ¨ì SI ®æ
3 , ¦bSI®æ¦³10­Ó¦r®É , BAR CODE¨S¦³ªF¦è«ö¤UENTER ¤£·|°õ¦æ ERRORADD  (¨¾¤î¦³³fª««ö¦íÁä½L¤Þ­PµL­­°õ¦æERRORADD)
4 , ¦bSI®æ¦³10­Ó¦r®É , BAR CODE 0­Ó¦r¥H¥~ / ¤£¬O10­Ó¦r °õ¦æ ERRORADD
5 , BAR CODE¨S¦³¥ô¦óMSGBOX (¨¾¤î¨Ï¥ÎªÌ¨S¦³¯d·N¤U¸õ¹L¤F¤U¤@­ÓBAR CODE)

§Úı±o°Ý¬O¦b³o¸Ì...
  1. Private Sub bar_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)

  2. If si.Value Like "" Then

  3. Me.si.SetFocus

  4. End If

  5. If KeyCode <> 13 Then Exit Sub


  6. If si.Value Like "??????????" Then
  7. If bar.Value Like "??????????" Then

  8. add
  9. Me.bar.SetFocus
  10. Me.bar.Value = ""

  11. End If
  12. End If

  13. If si.Value Like "??????????" Then
  14. If bar.Value Like "" Then

  15. Me.bar.SetFocus
  16. Me.bar.Value = ""

  17. Else

  18. erroradd

  19. End If
  20. End If


  21. noExit = True
  22. End Sub
½Æ»s¥N½X
END IF©ñªk¬O§_¦³¿ù?

¥ýÁÂ!

TakegoodsRecords.zip (23.24 KB)

¦n¹³¤w¸Ñ¨M...

±N©Ò¦³ SetFocus ¥Î noExit = True ¥N´À

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD