ValentinBIA
New Member
- Joined
- Oct 1, 2018
- Messages
- 1
Hello everyone! I'm fairly new to VBA, and I'm currently experimenting with Classes and Dictionaries.
However I encountered a problem, that for once, I was not able to solve using the infinite amount of ressources available on the internet.
Whenever I run my macro, I get the "argument not optional" compile error.
It highlights the 4th line of the below code in yellow and the "pParts" on the 5th line in blue.
I think that the error might be due to the fact that contrary to strings or longs, I cannot use Value for a scripting.dictionary. However, I don't know what to use instead.
Does someone know the answer to my question?
Thank you very much!
Best,
Valentin
However I encountered a problem, that for once, I was not able to solve using the infinite amount of ressources available on the internet.
Whenever I run my macro, I get the "argument not optional" compile error.
It highlights the 4th line of the below code in yellow and the "pParts" on the 5th line in blue.
I think that the error might be due to the fact that contrary to strings or longs, I cannot use Value for a scripting.dictionary. However, I don't know what to use instead.
Does someone know the answer to my question?
Code:
Public Property Get Parts() As Scripting.Dictionary
Parts = pParts
End Property
Public Property Let Parts(Value As Scripting.Dictionary)
pParts = Value
End Property
Thank you very much!
Best,
Valentin