I tried with both but to no avail...
I know how to do it with class modules but the same approach doesn't work in code modules (NoSuchFieldException) despite that I can successfully iterate through the fields of the code module with the getFields method.