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 閱讀(360) 評論(0)  編輯  收藏 所屬分類: VBA

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


          網站導航:
          博客園   IT新聞   Chat2DB   C++博客   博問  
           
          主站蜘蛛池模板: 桦甸市| 蒲江县| 牙克石市| 安福县| 长顺县| 昭苏县| 佳木斯市| 钟山县| 古田县| 望城县| 洪江市| 赤壁市| 南召县| 保德县| 留坝县| 开封县| 河间市| 西和县| 丰城市| 浪卡子县| 沂水县| 张掖市| 循化| 勃利县| 泰宁县| 陆良县| 丹凤县| 邢台市| 星子县| 昌宁县| 庆阳市| 杂多县| 凉山| 洛南县| 长治市| 藁城市| 炎陵县| 枞阳县| 稷山县| 宁南县| 南安市|