- Jan 26, 2015
- Office Version
Sub findQTY() Dim pnum As Variant pnum = InputBox("Please Type in the part number") If dicQTY.exists(pnum) Then MsgBox dicQTY(pnum) Else MsgBox "No quantity available for this part number" End If End Sub
the problem occurs when pnum is all numeric.
so something that SHOULD exist in the dictionary is
"80017" with a value of 22
It returns the "No quantity" message though.
whereas "FK3264" with a value of 7 will display the correct msgbox because its a string?
any help would be appreciated