Hi, What exactly is it your trying to achieve by running a VBA macro from Excel? IMO I would suggest that you go one of these routes: - ODS tagsets.excelxp - unless there is something specific not in the tagset, this is the easiest. - If there is something specific then: - Create your spreadsheet as you would like it, with the macro in place. Export your data from SAS as plain XLS file. Now in your template spreadsheet import that data across into your template spreadsheet. This gives most flexibility as you can have VBA copy across and process the data. - Create your spreadsheet as you would like it and create named ranges for where the data should go. In SAS create a libname to the Excel file (example: http://www2.sas.com/proceedings/sugi31/024-31.pdf) and copy your data into the libname. - A final possibility is to learn Open Office format. XLSX is actually a ZIP file (change the extension) with some subdirectories and XML files within it. You can yourself create these XML files and structure in SAS with data and put statements if you know what you are doing. I would not suggest using DDE as it may/may not be supported in future and due to it being written for and Excel from years ago doesn't have full functionality. Plus if you have the script running in anything but locally installed with office then it will fail.
... View more