excel VBA calculate ªººÃ°Ý
- ©«¤l
- 18
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 19
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- excel 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2013-5-7
- ³Ì«áµn¿ý
- 2018-6-25
|
¦^´_ 29# GBKEE
¤jô
§Úı±oÀ³¸Ó¬ODDEªº°ÝÃD, À³¸Ó¤£¬Oµ{¦¡ªº°ÝÃD
¦]¬°§Y¨Ï¬O²{¦b§Ú¥´¶}ÀÉ®×
©Ò¦³¼Æ¦r³£¨S¦³§ïÅܪº±¡ªp¤§¤U(¤½¦¡·íµM¤]¨S¦³ÅÜ)
Ãö±¼ÀÉ®×
EXCEL³£·|¥X²{==> Àɮפw³Qקï¹L, §A¬O§_nÀx¦sÀɮתºmsgbox
©Ò¥H§Ú²q§Y¨Ï³£¨S¦³Åܪº±¡ªp¤§¤U
DDEÁÙ¬O¦³°Ê§@
§Ú²q¬O¤@¥´¶}ÀÉ®×
EXCEL´N·|¥h§ìDDEªº¸ê®Æ
©Ò¥H§Y¨Ï¼Æ¦r¨S¦³ÅÜ
¦ý¬O¹ïEXCEL¨Ó»¡
«o¬O«·s§ìªº |
|
excel VBA ¦nÃø³á...
|
|
|
|
|
- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-27
|
¡ÕDDE¤u§@ªí¸ê®Æ¨Ò¡Ö
¡Õ¤u§@ªí¨Æ¥ó°Ï¡Dµ{¦¡½X¡Ö
Private Declare Function PlaceOrderVB Lib "TC_Excel_Addin.xll" (ByVal OrderInfo As String) As String
Option Explicit
Private Sub Worksheet_Calculate()
Dim tmpResult As String
Dim OrderInfo_1 As String
If Date Mod 7 - 1 > 5 Then Exit Sub ¡@¡@'¤µ¤Ñ¬°¡e©P¤»¡D©P¤é¡f«D¥æ©ö¤é¡D¸õ¥X
If Time < TimeValue("08:00:00") Then Exit Sub¡@ ¡@'¥¼¨ì¶}½L¡D¸õ¥X
If Time > TimeValue("13:45:00") Then Exit Sub¡@¡@ '¤w¹L¦¬½L¡D¸õ¥X
If [D5] = "¤w°e³æ" And [D6] = Date Then Exit Sub ¡@¡@'¤µ¤Ñ¤w¦³°e³æ°O¿ý¡D¸õ¥X
If IsError([D4]) Then Exit Sub ¡@¡@ 'DDE¥¼¥¿½T³sµ²¡A©Î¤½¦¡¦³»~¡D¸õ¥X
If Val([D4]) < 0 Then Exit Sub ¡@¡@'¥¼¹F¥Ø¼Ð»ù¡D¸õ¥X
On Error GoTo 901 ¡@¡@¡@'µ{¦¡°õ¦æ¿ù»~®É¡A±j¨î¸õ¦Ü901¦æ¡A¥H¦^´_¨Æ¥óIJµo¡A¨Ã¸õ¥X
'-------------------------------------------
Application.EnableEvents = False
OrderInfo_1 = "" ' ¸Ì±¬OÓ¸ê, ¤U³æªº³]©w
tmpResult = PlaceOrderVB(OrderInfo_1)
PlaceOrderVB (OrderInfo_1)
[D5] = "¤w°e³æ"¡@'°e³æ°T®§
[D6] = Date¡@¡@'°e³æ¤é´Á
[D7] = Time¡@¡@'°e³æ®É¶¡
901: Application.EnableEvents = True
End Sub
¡Õ³Æµù¡Ö
¥H¤u§@ªí¨Æ¥ó¶i¦æDDE°ÊºAºÊµø¡A¨Ã¤£¤Ó¦n´x±±¡A¤§«e¦³¼g¹L´XÓ½d¨Ò¡A¬O¥H¡e¨C¬í¡f»¼°j¥Dµ{¦¡ºÊµø¤Î°O¿ý¼Æ¾Ú¡A
¥i¦Ü±Í³¡¸¨®æ¡A©Îºô¶·j´MÃöÁä¦r¡eã´£³¡ªL ª÷¤d¨½ DDE¡f°Ñ¦Ò¬ÛÃö¤U¸üÀÉ¡]µ{¦¡½X¤½¶}¡A¥B¦³µù¸Ñ¡^¡A
Ó¤H¨ÃµL¾Þ§@ªÑ²¼¤Î¨ä¥¦ª÷¿Ä°Ó«~¡A¤]±q¥¼¨Ï¥Î¹LDDE¡A¶È¾Ì´¢ºN¼gµ{¦¡¡A©Ò¥H½Ð¦Û¦æ®M¥Î¡AµLªk°µ¨p¤HªºªA°È¡C
º¸«áY¦³®É¶¡¡D©Î³\¤]¦b³o½×¾Â«ØÓ¡e¦Û°Ê°O¿ýDDE¡fÃD¤À¨É¡I
¥H¤W¯Â¦]ª©¥D¤@¥y¡eVBA¦nÃø¡f¡AÀ³½t¦Óµo¡I¡@¯¬¡@¾Þ§@¶¶§Q |
|
|
|
|
|
|