public static void AddRequest(ExcelInterop.Range caller) { using (ExcelMainWindow excelWindow = new ExcelMainWindow(caller.Application.Hwnd)) { ExcelInterop.Range firstOutputRange = caller.Offset[0, 1]; WizardViewModel viewModel = WizardViewModel.CreateInstance(caller, firstOutputRange); DynamicRequestManagementWindow window = new DynamicRequestManagementWindow(viewModel); WindowInteropHelper windowInteropHelper = new WindowInteropHelper(window); windowInteropHelper.Owner = excelWindow.Handle; window.DataContext = viewModel; window.ShowDialog(); } }