Hi Team,
I am getting type mismatch error.
I am storing multiple values into dictionary items. if no values items should be blank.
shown expected output screenshot.
Expected Output
Thanks
mg
I am getting type mismatch error.
I am storing multiple values into dictionary items. if no values items should be blank.
shown expected output screenshot.
VBA Code:
Sub Dict_Testing()
A = 10
B = 20
C = 30
Dim dict As New Scripting.Dictionary
dict.RemoveAll
dict.Add "x", Array(A, B, C)
dict.Add "y", Array(A)
'dict.Add "y", Array(a, b, c) ' this line works.
Range("a2").Resize(dict.Count, 3).Value = Application.Index(dict.Items, 0, 0)
End Sub
Expected Output
VBA_FORM.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | A | B | C | ||
2 | 10 | 20 | 30 | ||
3 | 10 | ||||
Sheet2 |
Thanks
mg