Hi All,

Please help me in resolving this issue. I have a VBA code after running it i am getting error as below
Compile error- User defined type not defined. Resolved this issue by Click on Microsoft Scripting runtime but after another error poped up Runtime error 457.

Sub RunTest2()


Dim i As Integer
Dim WsTest2 As Worksheet
Dim Key As String
Dim Item As String
Dim DicoDeal As New Dictionary
Set WsTest2 = ThisWorkbook.Sheets("TEST 2")

i = 1
While WsTest2.Range("A1").Offset(i).Value <> ""
Key = WsTest2.Range("A1").Offset(i).Value
Item = WsTest2.Range("C1").Offset(i).Value

DicoDeal.Add Key, Item

i = i + 1
Wend

End Sub

Please advise.. Thanks in advance