Populating a card variable using SetVar

I am working towards creating a "paste as reference" routine using the API for our ECO/ECN procedure, and am becoming re-acquainted with VB programming.  My first step was to simply pass the filename of a selected file to a variable on the card of the parent file (sounds simple right).  The variables within my code all seem to work but the SetVar command doesn't populate the target card variable even when I hard code it.  Portion of code below.

=================================================================

Dim vars As IEdmEnumeratorVariable8

vars = poCmd.mpoExtra

Dim VariantPath As Object

VariantPath = path

'vars.SetVar(VarName, "", VariantPath, 0

vars.SetVar("ECO_AffItem1", "", "New Value") 'Hardcode for test

System.Windows.Forms.MessageBox.Show(vault.GetWin32Window(poCmd.mlParentWnd),"Variable: " + VarName + "Populated With: " + VariantPath)

=====================================================================

Thanks

SolidworksSolidworks Pdm enterprise Pdm