is it possible to use the len of a class object as the record len while opening a file in random mode?

dim obj as new CClass

open datafile for random as ff len=len(obj)

i get an error 438 while trying

thanks