run time error '1004':
yes the macro is enabled when i open the 1st file security warning
yes they are both in the 'C:\ dir
i open test.xls manually and i want it to open data.xls automatically
Record a macro when you open that file manually. Use that code in the
workbook_Open event. (I'm guessing that you have a typo in your
drive/path/filename.)
If you have trouble modifying the workbook_open, then post the complete recorded
macro.