private void btnApartments_Click(object sender, RibbonControlEventArgs e) { using (FormSearch fs = new FormSearch(false)) { if (fs.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Globals.ThisAddIn.Application.Worksheets.Add(); Display(fs.d, Globals.ThisAddIn.Application.ActiveCell, false); } } }
private void btnHomes_Click(object sender, RibbonControlEventArgs e) { using (FormSearch fs = new FormSearch(true)) { if (fs.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Globals.ThisAddIn.Application.Worksheets.Add(); Display(fs.d, Globals.ThisAddIn.Application.ActiveCell, true); } } }