Jcat
          寵辱不驚,閑看庭前花開花落~~
          posts - 173,comments - 67,trackbacks - 0
          Declaring and Initialization
          Option ? Explicit
          ?
          Sub ?arrayInVBA()
          ????
          Dim ?a1( 5 )? As ? String
          ???? Debug.Assert?
          LBound (a1)? = ? 0
          ???? Debug.Assert?
          UBound (a1)? = ? 5
          ???? Debug.Assert?
          TypeName (a1)? = ? " String() "

          ????
          Dim ?a2( 2 ? To ? 5 )? As ? Integer
          ???? Debug.Assert?
          LBound (a2)? = ? 2
          ???? Debug.Assert?
          UBound (a2)? = ? 5
          ???? Debug.Assert?
          TypeName (a2)? = ? " Integer() "

          ????
          Dim ?arrayFunction:?arrayFunction? = ?Array( " aa " ,? " bb " ,? " cc " ,? " dd " ,? " ee " ,? " ff " )
          ???? Debug.Assert?
          LBound (arrayFunction)? = ? 0
          ???? Debug.Assert?
          UBound (arrayFunction)? = ? 5
          ???? Debug.Assert?
          TypeName (arrayFunction)? = ? " Variant() "

          ????
          ' initialize?by?Array()?function
          ???? Dim ?i? As ? Integer
          ????
          For ?i? = ? 0 ? To ? 5
          ????????a1(i)?
          = ?arrayFunction(i)
          ????
          Next ?i
          ????
          ????
          For ?i? = ? 0 ? To ? 5
          ???????Debug.Print?a1(i)
          ????
          Next ?i
          End?Sub
          posted on 2008-03-28 18:11 Jcat 閱讀(368) 評(píng)論(0)  編輯  收藏 所屬分類: VBA

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 宁陕县| 正镶白旗| 临朐县| 汝城县| 嘉黎县| 兴隆县| 沂南县| 玛沁县| 柳州市| 西乌珠穆沁旗| 辰溪县| 泽州县| 九江县| 神农架林区| 绩溪县| 洮南市| 泽州县| 昌图县| 澎湖县| 左云县| 东海县| 嵊泗县| 抚顺县| 章丘市| 奉贤区| 河曲县| 邯郸县| 普格县| 铜鼓县| 石柱| 洛扎县| 松滋市| 五大连池市| 育儿| 江永县| 成安县| 夏邑县| 都匀市| 阜平县| 社旗县| 云林县|