Hello everyone
My objective: Parse all controls within the masterform/subform and set the visibility property except these ones defined in a string array.
My solution: Create a recursive function which takes as argument a form, the list of the excluded form names and the visibility flag.
My problem: When passing the string array to the recursive function I get an BASIC runtime error “Object Value not set.”
I wrote the simplified code below which gives the same error when the For Each-codeblock in the recursive function is called. There’s no issue with same For Each-codeblock in the Test() function.
I believe there’s an issue how I pass the string array as it is not initialised in the recursive function.
Many thanks upfront for helping me solving the issue.