kaiiii
5 years agoRegular Contributor
Can we pass a Object in argument of a function.
CAn we pass an object as an argrument of a function that is declared in another unit.
like
Unit1:
'USEUNIT Unit2
Sub Task()
Set Obj = ............whatever here........
Call Validate(Obj)
End sub
Unit 2:
Function Validate(value)
Value.Click 'here I want to check properties for "value".... but getting errror "Object is required"
End Function
How can I pass object and use their properties in another unit. ?
When you get to the second function, you need to use something like eval() to tell it that what you passed isn't just a string. There's an example in here: