Hi all, I'm currently writing a Macro in VBA to refresh all SAS tables in an activeworkbook. I've tried two different methods, seen below, and while they work to refresh the tables, the run time is very slow in workbooks with multiple SAS tables (10 mins in some workbooks that would take 1 min if done manually). I believe this is occurring between table refreshes as it takes about 10-20 seconds to address the new table and update it. 1. Sub test() Dim sas As SASExcelAddIn Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object For Each sheet In ActiveWorkbook.Sheets If sheet.Name Like "*SAS*Table*" Then sheet.Activate sas.Refresh ActiveWorkbook.ActiveSheet End If Next sheet end sub 2. Sub test() Dim sas As SASExcelAddIn Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object sas.Refresh end sub Does anyone know if there is a way to speed up the time between refreshes, when a workbook has multiple tables embedded? It's to have it automated, but right now isn't worth it with how long some of the automatic refreshes are taking compared to a manually. Thanks in advance for the help!
... View more