當前位置:成語大全網 - 新華字典 - VBA中自定義的結構體,可以作為dictionary的value進行賦值嗎?

VBA中自定義的結構體,可以作為dictionary的value進行賦值嗎?

用類模塊,不要用type

插入模塊》重命名類模塊為 Update_data》寫入數據

Public Succes_data As Long

Public Fail_data As Long

》剩下的壹樣

定義初始化為0的升級結構體

Dim Single_Updata As Update_data

Sub 導入OTA升級數據()

Set Dic_Upid = CreateObject("Scripting.Dictionary")

For Each xCell In Range(Cells(ID_Row_Int + 1, Des_ID_Col), Cells(Des_data_Row, Des_ID_Col))

If xCell <> "" Then

set Single_Updata=new Update_data

'xxxxxxxxx

Dic_Upid.Key(xCell.Text) = Single_Updata

End If

Next xCell