When I run a macro that uses RExcel, I get a dialog box that says "Microsoft Excel is waiting for another application to complete an OLE action." There is no error in the RExcel commands in the macro, of that I am sure. The box appears to be related to the inclusion of RunRFile commands. The macro will run through the second RunRFile command, but will not execute the Worksheet.Pictures.Insert statements or the GetArray statements until the user clicks OK on the dialog box. Any insight into how I can avoid the dialog box would be appreciated. The macro is below. It's your basic, send-to-R, run R, retrieve-from-R macro. Call Rinterface.StartRServer Call Rinterface.RRun("rm(list = ls())") Call Rinterface.RRun("dev.off()") Call Rinterface.PutArray("mat1", Range("DATA_INPUT_OUTPUT!B7:I506")) Call Rinterface.PutArray("mat2", Range("DATA_INPUT_OUTPUT!J7:Q506")) Call Rinterface.PutArray("cpd", Range("DATA_INPUT_OUTPUT!A7:A506")) Call Rinterface.PutArray("name_of_assay_one", Range("DATA_INPUT_OUTPUT!B1")) Call Rinterface.PutArray("name_of_assay_two", Range("DATA_INPUT_OUTPUT!B2")) Call Rinterface.RunRFile("C:\Program Files\R\MDR Programs\AM_ACT_Macros.R") Call Rinterface.RunRFile("C:\Program Files\R\MDR Programs\AM_ACT.R") Worksheets("GRAPHS").Range("B58").Select Worksheets("GRAPHS").Range("B58").Clear Worksheets("GRAPHS").Pictures.Insert("C:\TEMP\var_means_both.jpg").Select Worksheets("GRAPHS").Range("B84").Select Worksheets("GRAPHS").Range("B84").Clear Worksheets("GRAPHS").Pictures.Insert("C:\TEMP\var_means_one.jpg").Select Worksheets("GRAPHS").Range("B110").Select Worksheets("GRAPHS").Range("B110").Clear Worksheets("GRAPHS").Pictures.Insert("C:\TEMP\var_means_two.jpg").Select Worksheets("GRAPHS").Range("B136").Select Worksheets("GRAPHS").Range("B136").Clear Worksheets("GRAPHS").Pictures.Insert("C:\TEMP\normality_one.jpg").Select Worksheets("GRAPHS").Range("B162").Select Worksheets("GRAPHS").Range("B162").Clear Worksheets("GRAPHS").Pictures.Insert("C:\TEMP\normality_two.jpg").Select Worksheets("GRAPHS").Range("B188").Select Worksheets("GRAPHS").Range("B188").Clear Worksheets("GRAPHS").Pictures.Insert("C:\TEMP\one_two.jpg").Select Worksheets("GRAPHS").Range("B214").Select Worksheets("GRAPHS").Range("B214").Clear Worksheets("GRAPHS").Pictures.Insert("C:\TEMP\pvalue_mean.jpg").Select Worksheets("GRAPHS").Range("B240").Select Worksheets("GRAPHS").Range("B240").Clear Worksheets("GRAPHS").Pictures.Insert("C:\TEMP\pvalue_hist.jpg").Select Call Rinterface.GetArray("pred_output$quant_one", Range("ASYM_MAX_ANALYSIS!A33:A37")) Call Rinterface.GetArray("pred_output$quant_two", Range("ASYM_MAX_ANALYSIS!I33:I37")) Call Rinterface.GetArray("sd_output$sd_one", Range("ASYM_MAX_ANALYSIS!B33:B37")) Call Rinterface.GetArray("sd_output$sd_two", Range("ASYM_MAX_ANALYSIS!J33:J37")) Call Rinterface.GetArray("sd_output$iqr_one", Range("ASYM_MAX_ANALYSIS!D33:D37")) Call Rinterface.GetArray("sd_output$iqr_two", Range("ASYM_MAX_ANALYSIS!L33:L37")) Call Rinterface.GetArray("pred_output$quant_one", Range("ASYM_MAX_ANALYSIS!A42:A46")) Call Rinterface.GetArray("pred_output$pred", Range("ASYM_MAX_ANALYSIS!C42:C46")) Call Rinterface.GetArray("pred_output$up_cb", Range("ASYM_MAX_ANALYSIS!I42:I46")) Call Rinterface.GetArray("pred_output$low_cb", Range("ASYM_MAX_ANALYSIS!K42:K46")) Call Rinterface.GetArray("sd_output$sd_ee[1]", Range("ASYM_MAX_ANALYSIS!E50")) Call Rinterface.GetArray("pv_data$pool_sd", Range("ASYM_MAX_ANALYSIS!C55")) Call Rinterface.GetArray("pv_data$lin_sd_comb", Range("ASYM_MAX_ANALYSIS!D55")) Call Rinterface.GetArray("pv_data$const_sd_comb", Range("ASYM_MAX_ANALYSIS!I55")) Call Rinterface.GetArray("pv_data$CV_sd_comb", Range("ASYM_MAX_ANALYSIS!J55")) Call Rinterface.GetArray("pv_data$lin_sd_one", Range("ASYM_MAX_ANALYSIS!D58")) Call Rinterface.GetArray("pv_data$const_sd_one", Range("ASYM_MAX_ANALYSIS!I58")) Call Rinterface.GetArray("pv_data$CV_sd_one", Range("ASYM_MAX_ANALYSIS!J58")) Call Rinterface.GetArray("pv_data$lin_sd_two", Range("ASYM_MAX_ANALYSIS!D61")) Call Rinterface.GetArray("pv_data$const_sd_two", Range("ASYM_MAX_ANALYSIS!I61")) Call Rinterface.GetArray("pv_data$CV_sd_two", Range("ASYM_MAX_ANALYSIS!J61")) Call Rinterface.GetArray("pv_data$N_one", Range("ASYM_MAX_ANALYSIS!C64")) Call Rinterface.GetArray("pv_data$N_two", Range("ASYM_MAX_ANALYSIS!D64")) Call Rinterface.GetArray("pv_data$lin", Range("ASYM_MAX_ANALYSIS!I64")) Call Rinterface.GetArray("pv_data$FO", Range("ASYM_MAX_ANALYSIS!J64")) Call Rinterface.RRun("dev.off()") Call Rinterface.StopRServer Joe Boyer Statistical Sciences Renaissance Bldg 510, 3233-D Mail Stop RN0320 8-275-3661 cell: (610) 209-8531 [[alternative HTML version deleted]]