- 帖子
- 17
- 主題
- 3
- 精華
- 0
- 積分
- 33
- 點名
- 0
- 作業系統
- XP SP3
- 軟體版本
- Office 2007
- 閱讀權限
- 10
- 性別
- 男
- 註冊時間
- 2011-4-30
- 最後登錄
- 2012-12-21
|
Dear 大大
我想產生一些array的變數,如下:
dim 收盤value as Variant
dim 外資value as Variant
dim 投信value as Variant
dim 自營value as Variant
dim 融資value as Variant
dim 融券value as Variant
................
dim 收盤price as Variant
dim 外資price as Variant
dim 投信price as Variant
dim 自營price as Variant
dim 融資price as Variant
dim 融券price as Variant
................
因為很多,而且常常只有變數的後半段不一樣(會有變化),但變數前半段名稱都一樣
請問有沒有可能將: 收盤價,外資,投信,自營商,融資,融券..先變成array
Dim MySheets(8) As String
MySheets(0) = "收盤"
MySheets(1) = "外資"
MySheets(2) = "投信"
MySheets(3) = "自營商"
MySheets(4) = "融資"
MySheets(5) = "融券"
MySheets(6) = "開盤"
MySheets(7) = "最高"
MySheets(8) = "最低"
能不能利用迴圈將它們加上後半段的名稱,來宣告變數
如果VB不行C++可以嗎?
感謝! |
|