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

[µo°Ý] VBA¤£µ¹¥Î¤u§@ªí¨ç¼ÆABSµ´¹ï­È¥\¯à¶Ü?

[µo°Ý] VBA¤£µ¹¥Î¤u§@ªí¨ç¼ÆABSµ´¹ï­È¥\¯à¶Ü?

½Ð±Ð¤@¤U¦U¦ì°ª¤â
  1. a = -0.543
  2. msgbox application.worksheetfunction.abs(a)
½Æ»s¥N½X
ABSµ´¹ï­È¨ç¼Æ¦b¤u§@ªí¤W­±¨Ï¥Î¬O¥i¦æ¡A¦ý²¾¨ìVBAµ{¦¡½X¸Ì­±´N¤£¯à¥Î¶Ü?
¦U¦ì°ª¤â¦bVBA¸Ì­±­n¨Ï¥ÎABSµ´¹ï­È±o¥\¯à®É¡AÃø¹D¥u¯à¥´...
  1. if a < 0 then a = -a
½Æ»s¥N½X
¤F¶ÜO___Q?!
ÁöµM¤]¤£¬O¤£¦æ°Õ.....

¦^´_ 1# VBALearner

¦ý¬O¥Îevaluate´N¥i¥H...?! ¨ì©³®t¦b­þ¸Ì©O...=¤f="
  1. a = -0.543
  2. Msgbox Application.evaluate(ABS(a))
½Æ»s¥N½X

TOP

¦^´_ 1# VBALearner
MsgBox Abs(a)

TOP

¦^´_ 2# VBALearner


    Abs()¬OÄÝ©óVisual Basic¨ç¼Æ¡Aª½±µ¤Þ¥Î´N¥i¥H¤F
Dim MyNumber
MyNumber = Abs(50.3)    ' ¶Ç¦^ 50.3¡C
MyNumber = Abs(-50.3)    ' ¶Ç¦^ 50.3¡C

TOP

¦^´_ 4# lpk187

³á³áª¾¹D¤F·PÁ±z!
¶¶«K°Ý¤@¤U³á ­n¦p¦óª¾¹D¨ç¼Æ¬O¤£¬OVisual Basicªº¤º«Ø¨ç¼Æªü?

TOP

¦^´_ 3# c_c_lai

³á³á¥i¥H¤F·PÁÂ!
¥i¥H¶¶«K°Ý¤@¤U±z¦³Ãö©ó [ ] ªº¥Îªk¶ÜT___T?
¹ê¦b¬O¦³ÂIÃøÀ´¤¤¬A©·ªº¥Îªk......

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2016-8-8 00:20 ½s¿è

¦^´_ 5# VBALearner


    ¦bVBE¦b¤¤¨Ï¥Î"¦C¥XÄݩʩΤèªk"
·í§AÁä¤JApplication.WorksheetFunction.®É©ÒÅã¥Ü¥Xªº¤U©Ô¦¡¿ï³æ©Ò¦C¥Xªº³£¬O¤u§@ªí¨ç¼Æ¡C¦p¤U¹Ï¡G

¦ÓVBªº¤ºÁä¨ç¼Æ´Nª½±µ¿é¤J§Y¥i¡A¦p¤U¹Ï¡G¤Ï¥Õ³¡¥÷¡A«Ü¹³ºñ¦â¾ó¥ÖÀ¿¹Ï¥Ü´N¬OVBA¤ºÁä¨ç¼Æ


¦b VBE»¡©ú¤¤¡A·j´M "Visual Basic ¤¤¥i¥Îªº¤u§@ªí¨ç¼Æ²M³æ"¡A¥iÀò¨ú¨ä²M³æ

·íÁA¸Ñ¤u§@¨ç¼Æ«á¡A¥B¤u§@ªí¨ç¼Æ¦bVBA¿é¤J®É¡A¬O¥i¥H²¤Æ¨ä»y¥y¡A
¦pApplication.WorksheetFunction.CountA()¥i²¤Æ¦¨Application.CountA()©ÎWorksheetFunction.CountA()

TOP

¦^´_ 7# lpk187

³á³á«zÀ´¤F!·PÁ±z¸Ô²Óªº¦^µª!!!

TOP

¦^´_ 6# VBALearner


    VBA¤º ¤¤¬A¸¹ [ ] ¬Û·í©ó Range  ­È
           
               '³æ¤@cell ­È:
                   a= cells(1,"A")
                   a = [A1]
              '¤@­Ó°}¦C 1x2 ªº­È
                   b= range("A1:B1")
                   b = [A1:B1]
            '¤@­Ó°}¦C 3x3 ªº­È
                  c = range("A1:C3")
                  c = [A1:C3]

TOP

¦^´_ 9# Scott090

VBA¤º ¤¤¬A¸¹ [ ]  «ü¬¡­¶Ã¯ªº[¦WºÙ,ª«¥ó,½d³ò,¨ç¼Æªº­pºâ],¤£¥i¬OVBA¤ºªºÅܼÆ
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD