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
|
excel VBA calculate ªººÃ°Ý
Àx¦s®æA1 ·|±q¥~³¡±µ¦¬¸ê®Æ (DDE±µ¦¬¶}½L»ù)
¨Ò¦p ¥x¿n¹q¶}½L»ù
§Ú³]©w¤@ӥؼР(100¤¸)
¦pªG·í¤Ñ¶}½L>=100
´N·|°õ¦æ°e³æ
§ÚGOOGLE¤F¤@¤U
ºô¸ô¤W³£¬O±Ð¨Ï¥Î calculate ©Mchange³o¨âÓ«ü¥O
¦]¬°±µ¦¬¥~³¡¸ê®Æ
©Ò¥H¥u¯à¨Ï¥Îcalculate
¦ý§Ú¸Õ¤F¤@¤U
µo²{¨âÓ°ÝÃD
1. ´N¬O§Ú¥D°Ê§ïA1(§ï¬°101)ªºÈ, ¨Ã¤£·|¥D°Ê°e³æ, ¦Ó¬On±qVB¸Ì±«ö°õ¦æ¤~·|°e¥X³æ¤l.
2. ¤@¥¹«ö¤F°õ¦æ, ´N·|¤@ª½°e³æ°eÓ¤£°±, ¦³¨S¦³¿ìªk³]©w¦¨A1ÅÜ°Ê1¦¸, °e³æ1¦¸©O?? |
|
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-23
|
¡Õ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 |
|
|
|
|
|
|
- ©«¤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
- 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
¤u§@ªí¤W¥u¦³3ÓÀx¦s®æ¦³¼Æ¦r
¤µ¤é¶}½L»ù ¬Q¤é¦¬½L»ù
ÁÙ¦³¤@ÓÀx¦s®æ¬° ¤µ¤é¶}½L»ù-¬Q¤é¦¬½L»ù
©Ò¥H¤@¶}½L¤§«á
¼Æ¦rÁÙ¦³¤½¦¡´N³£¤£·|ÅܤF.... |
|
excel VBA ¦nÃø³á...
|
|
|
|
|
- ©«¤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
|
¦^´_ 27# GBKEE
Q ¦ý¬OEXCELÁÙ¬O¤@ª½¦b°õ¦æ ->ªÑ¥«Àç·~¤¤ : ¤u§@ªí¤WªºDEE¤½¦¡·|¦³Åܰʹï¶Ü?
¤u§@ªí¤WªºDDE¤½¦¡¤£·|¦³ÅÜ°Ê, ¦ý¬O¥i¥H½T©w¬OEXCEL«o¬O«ùÄò°õ¦æ.
Q ¦ý¤§«á²z½×¤WÀ³¸Ó¤£·|¦A°õ¦æ°e³æ¤F ->¤u§@ªí¤WªºDEE¤½¦¡¦³¤@Ó¥H¤W¹ï¶Ü?
¤u§@ªí¤W¨CÓÀx¦s®æ³£¥u¦³¹ïÀ³¤@ÓDDE¤½¦¡
Q ¶¡¹j20¬í·|¬OEXCELªº°ÝÃD¶Ü? ->ªÑ¥«Àç·~¤¤,·|¨C¬í¨C¤À³£¦³¥æ©ö¶Ü?
´Á³fªº¸Ü, ¨C¬í³£·|¦³¥æ©ö... |
|
excel VBA ¦nÃø³á...
|
|
|
|
|
- ©«¤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
|
¦^´_ 25# shy
¥i¥H¦A½Ð±Ð¨âÓ°ÝÃD¶Ü
´N¬O¥u·Q¤@¶}½L¥u¥æ©ö¤@¦¸
¤§«á¤£ºÞ¤£ºÞ²Å¤£²Å¦X±ø¥ó
³£¤£¦b°õ¦æ¦Û°Ê¤U³æ
ì¦]¬O³o¼Ëªº
§Ú¦b´ú¸ÕDDE°e³æªº³t«×®É
µo²{¤@¥ó¨Æ±¡
¦pªGÀx¦s®æ¤À§O¬O==> ¤µ¤é¶}½L»ù©M¬Q¤é¦¬½L»ù
·Ó¹D²z·í¶}½L¶}¤§«á´N·|¤£°Ê¤F
¦ý¬OEXCELÁÙ¬O¤@ª½¦b°õ¦æ
¨Ò¦p
¤µ¤é¶}½L100, ¬Q¤é¦¬½L99 ==> ¤µ¶}-¬Q¦¬>=0==>²Å¦X±ø¥ó==>°õ¦æ°e³æ
¦ý¤§«á²z½×¤WÀ³¸Ó¤£·|¦A°õ¦æ°e³æ¤F
¦]¬°³o¨âÓÀx¦s®æªºÈ¤w¸g¤£·|¦A°Ê¤F
¦ý¹ê»Úª¬ªp«o¬O¤@ª½°e³æ
§Ú²q³o¬ODDEªº°ÝÃD
©Ò¥H¤~·Q°®¯Ü¥u°õ¦æ¤@¶}½Lªº¨º¤@¦¸
¤§«á¤£ºÞ²Å¦X¤£²Å¦X³£¤£¦A°Ê§@
²Ä¤GÓ°ÝÃD¬O
§Úµo²{°e³æªº®É¶¡«Ü³W«ß
³£¬O¶¡¹j20¬í
·Ó²z»¡
DDEY¬O¨C¬í³£·|¸õ°Êªº¸Ü
¤£¬OÀ³¸Ó¥u¶¡¹j1¬í¶Ü
¶¡¹j20¬í·|¬OEXCELªº°ÝÃD¶Ü
Y¬O§Ú·Q§ï¦¨¶¡¹j1¬íªº¸Ü
¬O¤£¬O¥i¥H¦bEXCEL¤W±§ï©O?? |
|
excel VBA ¦nÃø³á...
|
|
|
|
|
- ©«¤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
|
¦^´_ 24# Hsieh
GBKEE & Hsieh ¤jô
¥Ø«e°£¤F¤@¶}±ÒÀÉ®×·|°e³æ¨â¦¸¥~
(²Å¦X±ø¥ó·|¦Û°Ê°e³æ¨â¦¸, ¤£²Å¦X±ø¥ó´N¨S¦³°Ê§@...)
¨ä¥L°ò¥»¤W³£¨S¦³°ÝÃD¤F
µ{¦¡ªº¹B§@
DDE³ø»ù¸õ°Ê==>²Å¦X±ø¥ó==> ¦Û°Ê°e³æ
¤£²Å¦X±ø¥ó==> ´N¨S¦³°Ê§@
±µ¤U¨Ó¤p©f¶}©l¥H³oÓ¬°°ò¦
¶}©l§ó¶i¤@¨Bªº¼g§@....
«D±`·PÁ§AÌ.. |
|
excel VBA ¦nÃø³á...
|
|
|
|
|