I am using the following QueryTable Inquiry. After the .Refresh executes the VBA procedure ends. The inquiry works but I need to execute code after it complete
Please make sure your QueryTable_AfterRefresh sub is placed NOT in the module, but under Sheet / Workbook, the same way as here: https://stackoverflow.com/a/14646261/1953175 Moreover, you do not need to call event, remove .AfterRefresh (Success) from your code.