I would like to remove/disable the VBA code that is in an xlsm file that will be used to import and analyse data, its then saved as a different file name. But when you open that file it tries to re-import the data again as these file will be opened by many people I can not guarantee that they macro's disabled or external data. The code is: Private Sub Workbook_Open()
ActiveWorkbook.Connections("Demo").Refresh
End Sub I'm using the code as Winautomation is processing the file and the import doesn't work if I use the property setting within the Data Wizard, but with the above code it does. Is there a way of adding workbook name into the above code so it on works if that particular workbook is open??
ActiveWorkbook.Connections("Demo").Refresh
End Sub I'm using the code as Winautomation is processing the file and the import doesn't work if I use the property setting within the Data Wizard, but with the above code it does. Is there a way of adding workbook name into the above code so it on works if that particular workbook is open??