Hallo,
danke für deine schnelle Antwort, du hast recht ein wenig Infos wären wohl noch gut gewesen
.
Ich habe ein Stück meines Codes eingefügt.
excelApp = new Excel.Application();
wb = excelApp.Workbooks.Open("C:\\neue.xlsm", Notify: false);
ws = (Excel.Worksheet)wb.Worksheets["neue"];
i = 2;
while (ws.Cells[z, 1].Value != null)
{
if (mi.Text == ws.Cells[z, 1].Value.ToString() + " / " + ws.Cells[z, 2].Value.ToString())
{
try { richTextBox1.Text = ws.Cells[ i, 9].Value.ToString(); }
catch { }
try { richTextBox2.Text = ws.Cells[ i, 10].Value.ToString(); }
catch { }
break;
}
else { i++; }
}