We use an object reference in VBA code for Word 97 and it works fine. Now converting to Word 2000 and unable to figure out why it generates run-time error.
Under Word 97
dim oAuthorsQ as object
dim members as object
set members = new clsautharr
set oAuthorsQ = createobject(“mlis_authors.member_query”)
oAuthorsQ.Membership members
the code above works fine under 97
(returning array of names from Foxpro table)
but under 2000 generates error on execution of last line of code as follows:
Run-time error 98.
A property or method cannot include a reference to a private object, either as an argument or as a return value.
Under the class module property window, the instancing property is private and only other option is PublicNotCreateable.
I tried to declare the objects as public before instead of dimming in private module, but that didn’t work either.
Thanks.
Ann Brandon