Xdata for element in OpenDesignFileForProgram

Fellow Microstation VBA users,

I neeed some basic code to add/modify Xdata for an element, in a cell, in a design file, opened with OpenDesignFileForProgram.  I'm uncertain how to do this.  My guess would be to utilize the Appplication.ObjectConnector or the mdlModelRef_loadReferenceModels?

Thanks in advance,

Christmas May