I have:
Protected Sub SepInsert(ByVal mriId As VariantType,
ByVal aeId As VariantType,
ByVal absId As VariantType)
...
End Sub
and want to call it with a DropDownList selection like this:
Protected Sub cmdNewPrelinkedMri_Click(ByVal sender As Object,
ByVal e As System.EventArgs
) Handles cmdNewPrelinkedMri.Click
SepInsert(ddlMriUnassigned.SelectedValue, -1, -1)
End Sub
where the ddl selected value is, of course, a string (e.g., "0412B0").
I am getting an InvalidCastException saying: Conversion from string "0412B0" to type 'Integer' is not valid. Why does it want to convert to 'Integer' when the parameter is declared as VariantType?
What am I misunderstanding or doing wrong? Thanks,
Chris