I think you need to go to classes - which, from what you are describing and what I understand, is what you are after. There is some good info on classes in the Excel list address I sent yesterday. I really can't go much further than that Garry. Regards, Warren ________________________________ From: austechwriter-bounce@xxxxxxxxxxxxx [mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of Garry Stevens Sent: Wednesday, 15 September 2010 8:33 AM To: austechwriter@xxxxxxxxxxxxx Subject: atw: Re: Office Automation VBA guru-- anyone out there to ask question of? Note: This e-mail is subject to the disclaimer contained at the bottom of this message. ________________________________ Hi All: Thanks for the offers of help. Problem is simple: how to return a complex value from a function call. I call the Excel macro "GetDocMetaData" from this Word code (xlApp is a var of type Excel app): dataFromSheet = xlApp.Run("'CTP interface macros.xls'!GetDocMetaData", doc.Name) Works just fine, but I can only declare "dataFromSheet" as a simple type. At the moment it's a String. Ideally I'd like to return something like this: Type Props Name As String Value As String End Type Dim dataFromSheet (10) As Props This simply does not work, even with identical declarations in the Excel and Word code. I'm not familiar with classes, so haven't gone there. Tried setting "dataFromSheet" as a var of type Object. No luck. Any help appreciated. Garry ________________________________ The information transmitted in this message and its attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by persons or entities other than the intended recipient is prohibited. If you have received this in error, please contact the sender and delete this e-mail and associated material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files, with the permission of the sender. This message has been scanned for viruses. ________________________________