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

DDE¸ê®Æ§ì¨ú,³v®æÅã¥Ü°ÝÃD

DDE¸ê®Æ§ì¨ú,³v®æÅã¥Ü°ÝÃD

½Ð°Ý¦U¦ì¤j¤j,
¦bDDE¤¤, §Ú»Ý­n¨C10¤ÀÄÁ§ì¨ú¸ê®Æ.
¦ý­n³v®æÅã¥Ü,
·N«ä¦p¤U:
8:45´Á³f¶}½L....²Ä¤@µ§¸ê®Æ
8:55......²Ä¤Gµ§¸ê®Æ
9:05......²Ä¤Tµ§¸ê®Æ
.....¥H¦¹Ãþ±À.
Àɮפ¤,
Sheet1...¬O¨÷°ÓDDE¸ê®ÆÅÜ°Ê.
Sheet2...¨C¤Q¤ÀÄÁ§ì¨ú¸ê®Æ.
³o­n¦p¦ó¼g©O?
Jackson

¦^´_ 1# jackson184
¶ÇÀɨӸոÕ

TOP

¦^´_ 2# GBKEE


    WMS-Test.rar (12.14 KB)

¥ý·PÁÂGBKEEÀ°¦£,
Àɮפ¤¦³¤T­Ó­¶­±,
²Ä¤@­¶: §Ú­nÆ[¬dWMS«ü¼Æ.
²Ä¤G­¶:§ì¨ú²Ä¤T­¶¨÷°ÓDDE¦^¶Çªº¼Æ¾Ú, »Ý­n³v®æ°O¿ý90¦¸. ¨C10¤ÀÄÁ§ì¨ú¤@¦¸.
²Ä¤T­¶:¨÷°ÓDDE¼Æ¾Ú.

«Ü©êºp, VBA­è¾Ç²ß¤¤, ¬Ý¹L¦U¦ì°Q½×, ÁÙ¤£¤Ó®e©ö¤W¤â,
¦]¬°¬O¤p¾Ç¥Í¸ê®æ, ¨S¿ìªk¤U¸üÀÉ®×.

©ÎªÌ½ÐGBKEE©Î¦U¦ì¤j¤jµ¹­Ó¤è¦V, §Ú¦AºCºC¾Ç²ß, ¦A½Ð¦U¦ìÀˬd.

WMS-Test.rar (12.14 KB)

Jackson

TOP

¦^´_ 3# jackson184
¦p¹Ï ´¡¤J¤@¼Ò²Õ ±N¤U¦C¨âµ{§Ç¶K¤W

  1. Option Explicit             '¦b¼Ò²Õ¼h¦¸¤¤±j­¢¨C­Ó¦b¼Ò²ÕùتºÅܼƳ£¥²¶·©ú½Tªº«Å§i¡C
  2. Dim Rng As Range            ' ³q¥Î©ó¼Ò²Õ(Module) ¤ºªº¨p¥ÎÅܼÆ
  3. Private Sub AUTO_OPEN()     '¦¹¥¨¶°©óÀɮ׶}±Ò®É·|¦Û°Ê°õ¦æ
  4.     With Sheets("90")
  5.         .UsedRange.Offset(1).Clear                '²M°£ «e¤@¤éªº¼Æ¾Ú
  6.         Set Rng = .Range("A2:A31,F2:F31,K2:K31")  '¼Æ¾Ú¶Ç¦^ªº°Ï°ì,¬°¦h­«½d³ò.
  7.     End With
  8.     If Time < TimeValue("08:45") Then             '¦­©ó¶}½L®É¶¡
  9.         Application.OnTime TimeValue("08:45"), "MyDee"    '³]©w©ó08:45 °õ¦æ MyDee µ{§Ç
  10.     ElseIf Time >= TimeValue("08:45") And Time <= TimeValue("13:30") Then '©ó¥æ©ö®É¶¡¤º
  11.         MyDee                                     ' °õ¦æ MyDee µ{§Ç
  12.     End If
  13. End Sub
  14. Private Sub MyDee()
  15.     Dim A As Integer, Ar(), R As Integer, C As Integer
  16.      If Time > TimeValue("13:30") Then Exit Sub     ' ¦¬½L®É¶¡«á °±¤î°õ¦æ
  17.     A = Application.CountA(Rng)             '­pºâ (¼Æ¾Ú¶Ç¦^ªº°Ï°ì)¦³¸ê®ÆÀx¦s®æªºÁ`¼Æ
  18.     If A <= 29 Then C = A + 1               'C ¬°  ¼Æ¾Ú¶Ç¦^ªº°Ï°ìªº¦C¦ì
  19.     If A Mod 30 >= 0 Then C = (A Mod 30) + 1
  20.     R = Int(A / 30) + 1                     'R ¬°¦h­«½d³òªº²Ä´X­Ó½d³ò
  21.     With Sheets("³sµ²")
  22.         Ar = Array(Now, A + 1, .Range("I2"), .Range("J2"))
  23.         'Ar ¬°¨ú±o  1. ®É¶¡, 2.¶µ¦¸,3.³Ì°ª»ù ,4,³Ì§C»ù  '§ä¤£¨ì ->  ¦¬½L»ù§ä¤£¨ì
  24.         'Ar = Array(Now, A + 1, .Range("I2"), .Range("J2"), ¦¬½L»ù ) '¦³¦¬½L»ù
  25.     End With
  26.     Rng.Areas(R).Cells(C).Resize(1, 4) = Ar
  27.     'Rng.Areas(R).Cells(C).Resize(1, 5) = Ar   '¦³¦¬½L»ù
  28.     Application.OnTime Now + TimeValue("00:10"), "MyDee"  '³]©w 10¤À«á °õ¦æ MyDee µ{§Ç
  29. End Sub
½Æ»s¥N½X

TOP

½Ð°Ý³o­Ó¨Ò¤l­n¦w¸Ë¤°»òÃB¥~³n¥ó¤~¯à¹B¦æ?
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-4-1 16:52 ½s¿è

¦^´_ 5# FAlonso
¼Ó¥D¬O¥Î¬Ý½L³nÅ骺
¸Õ¸Õ¬Ý,¥i¿ï¾ÜªÑ²¼,10¬í¬ö¿ý¤@¦¸.

ªÑ²¼¬ö¿ý.rar (14.88 KB)

TOP

¦^´_ 6# GBKEE
ÁÂÁ¦^ÂÐ,¤£¹L¦³´XÂI°ÝÃD
¦]¬°GBKEE¤j¤j¨S¦³¼gend if,Ū°_¨Ó¦³ÂI¤£ºD
µ{¦¡¬O§_«ü
  1. If Time > TimeValue("13:30") Then
  2. Exit Sub
  3. End If
  4. ...
  5. ...
  6. ...

  7. If InStr(.ResultRange.Rows(3).Cells(1), stockcode) = 0 Then  
  8. GoTo refresh_err:
  9. Else

  10. Application.EnableEvents = False

  11. Set myrange = mysheet.Range("a65536").End(xlUp).Offset(1).Resize(1, .ResultRange.Columns.Count - 1)
  12. myrange.Value = .ResultRange.Rows(3).Value

  13. Application.EnableEvents = True

  14. myrange.Select

  15. End If
  16. End With

  17. Application.OnTime Now + TimeValue("00:00:10"), "myprogram"

  18. exit sub   ³o­Óexit sub¬O¹ïÀ³¤°»ò

  19. refresh_err:
  20. MsgBox "Stock " & stockcode & " cannot be found"

  21. End Sub
½Æ»s¥N½X
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¥»©«³Ì«á¥Ñ jackson184 ©ó 2011-4-2 15:26 ½s¿è

¦^´_ 4# GBKEE


    ÁÂÁÂGBKEE¤j¤j,
¦]¬°§ÚÁÙ¬O¤p¾Ç¥Í,
ÁÙ¤£¯à¤U¸ü±zªº½d¨Ò.
§Ú¦A¸Õ¬Ý¬Ý, ¤£À´¦A½Ð±Ð±z.
Jackson

TOP

¦^´_ 8# jackson184
¨Ì¹Ï¤ù¦b§Aexcelªº vbaµøµ¡ ´¡¤J¤@¼Ò²Õ
¦^¨ì ½×¾Â  ¦p¹Ï
  «ö¤U ¡u½Æ»s¥N½X¡v«á·|Åã¥Ü [¥N½X¤w½Æ»s¨ì°Å¶Kï] ªº«H®§ ,¦^¨ì vbaµøµ¡¶K¤W§Y¥i





¦^´_ 7# FAlonso
If Time > TimeValue("13:30") Then
Exit Sub
End If
'''''''''''''''''''''''''''''''''''''''''
If Time > TimeValue("13:30") Then  Exit Sub
¦¹¬°Â²¤Æ ³£¬O¥i¹F¨ì¤@¼Ëªº®ÄªG

TOP

¦^´_ 9# GBKEE
ÁÂÁÂ
§Ú¥t¥~¦b"¬ö¿ý"¤@­¶¥[¤F¥H¤Uµ{¦¡
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Count > 1 Or Target.Address <> "$C$1" Then
  3. Exit Sub
  4. Else
  5. Sheet2.Range("A3:K65536").Clear
  6. myprogram  '©MmyDEEªºµ{¦¡¤@¼Ë
  7. End If
  8. End Sub
½Æ»s¥N½X
­ì·N¬O·Q·íC1®æ¤lªÑ²¼½s¸¹ÅÜ°Ê®É,²MªÅ"¬ö¿ý"ªº¸ê®Æ¥H¤Þ¤J·sªÑ²¼°T®§
¦³¤@ÂI¤p°ÝÃD,·í¸ÓªÑ²¼½s¸¹¤£¦s¦b®É,·|¤Þµo¨â¦¸"¨S¦³¸ÓªÑ²¼"ªºmsgbox
²z½×¤WÅã¥Ümsgbox«áÀ³¸Ó¤°»ò¤]¤£°Ê,¤£¹Lµ{¦¡«oÃB¥~³s½u¦Üweb,µM«á¦A°õ¦æmsgbox
§Ú¥ÎF8³v¦æµ{¦¡°õ¦æ¤]¥uÅã¥Ü¤@¦¸¦Ó¤w
¤£ª¾¦³¦ó¸Ñ¨Mªk?
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦pÆp¥Û¡j®É¶¡¹ï¤@­Ó¦³´¼¼zªº¤H¦Ó¨¥¡A´N¦pÆp¥Û¯ë¬Ã¶Q¡F¦ý¹ï·M¤H¨Ó»¡¡A«o¹³¬O¤@§âªd¤g¡A¤@ÂI»ù­È¤]¨S¦³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD