Hi.

sorry for the questions.

i want selected item from commbobox.


i try
public void Macro_selectitem()
{
System.Diagnostics.Debug.Print( combo.Text);
}

but Output message
->A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll

I found a way to search the Internet.( Debug->expetions->thow->check)
But the exception message.

my source code.

Microsoft.Vbe.Interop.Forms.ComboBox combo;
public void Macro_Init_CombBox()
{
try
{
zenOn.IElement zElementActivX = this.Project.DynPictures().Item("Picture_Login").Elements().Item("ActiveX_16");

combo = zElementActivX.AktiveX() as Microsoft.Vbe.Interop.Forms.ComboBox;

combo.Clear();

object defaultParameter = null;
//Fill the ComboBox with Items
int y = 1970;



string a= DateTime.Now.ToString("yyyy");
int lastYear = Convert.ToInt32(a);
object k = 1970;
int asdf = 0;
for (y = 1970; y <= lastYear; y++)
{
k = y;
defaultParameter = asdf;
combo.AddItem(ref k, ref defaultParameter);

asdf++;

}

}
catch (Exception ex)
{
System.Diagnostics.Debug.Print("ERROR Macro_Init(): "
+ ex.Message + " " + ex.Source);
}
}