Jcat
          寵辱不驚,閑看庭前花開花落~~
          posts - 173,comments - 67,trackbacks - 0
          Options
          Option Explicit

          You must explicitly define each variable that you use.

          Option Private Module
          You can force all procedures in a module to be private - even those declared with the Public keyword.
          You can omit the Private keyword from your Sub declarations.

          Option Base [01]
          The lower bound of an array, created using the Array function, is determined by Option Base statement at the top of the module. The default lower bound is 0


          Declaring Variables
          Dim ?變量? As ? String
          變量?
          = ? " initialization "

          Const ?常量? As ? String ? = ? " initialization "

          Dim ?定長字符串? As ? String ? * ? 10
          定長字符串?
          = ? " 超過ten個無效(中文英文都算1個,看來編碼用的unicode) "



          Executing Sub from another Procedure
          Option ? Explicit


          Sub ?executingWay()
          ??? add?
          " flame " ,? 1 ,? 2

          ??? Call ?add( " call " ,? 1 ,? 2 )

          ??? Dim ?subName? As ? String :?subName? = ? " add "
          ??? Run?subName,?
          " run " ,? 1 ,? 2
          End?Sub


          Sub ?add(exeBy? As ? String ,?x? As ? Integer ,?y? As ? Integer )
          ??? MsgBox ?exeBy? & ? " :? " ? & ?(x? + ?y)
          End?Sub


          Executing Function from another Procedure
          Option ? Explicit

          Function ?executingWay()
          ??? Debug.Print?add(
          " flame " ,? 1 ,? 2 )

          ??? Dim ?funcName??? As ? String :?funcName? = ? " add "
          ??? Debug.Print?Run(funcName,?
          " run " ,? 1 ,? 2 )
          End?Function


          Function ?add(exeBy? As ? String ,?x? As ? Integer ,?y? As ? Integer )? As ? String
          ??? add?
          = ?exeBy? & ? " :? " ? & ?(x? + ?y)
          End?Function

          posted on 2008-03-20 11:16 Jcat 閱讀(229) 評論(0)  編輯  收藏 所屬分類: VBA

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 汝城县| 大关县| 青田县| 沈阳市| 永丰县| 五河县| 宜兴市| 太和县| 镶黄旗| 芦山县| 安仁县| 滦平县| 东乌| 安庆市| 山阳县| 福安市| 阿瓦提县| 淮阳县| 高阳县| 华容县| 古浪县| 吴忠市| 崇左市| 洛扎县| 丰镇市| 信丰县| 开封市| 三穗县| 松潘县| 册亨县| 清远市| 德江县| 通山县| 社旗县| 莱州市| 抚松县| 洛川县| 沙洋县| 鹿泉市| 海晏县| 旺苍县|