Hi there all,
I've got a really strange problem when saving workbooks from an excel macro. My macro is running from one workbook and opening several other workbooks, refreshing data connections in them, saving them and closing them. However if I then open one of the workbooks that has been saved by the macro and type a new date entry in a table (that has nothing to do with the data connections that were refreshed), it is formatted with a "custom" date format of m/d/yyyy, rather than the default date format used for the rest of the table (dd/mm/yyyy in my case).
Note that none of the cells containing existing dates are changed, and if you enter a date outside the table range it is formatted with the default date format.
Any ideas? We can work around by reformatting the cell, or the whole column, back to the default date format, but this is a pain and I would like to know why this is happening. (If I do the exact same operation manually, ie open workbook, refresh all data connections, save and close, then the problem doesn't arise.
Thanks!
Oliver.
I've got a really strange problem when saving workbooks from an excel macro. My macro is running from one workbook and opening several other workbooks, refreshing data connections in them, saving them and closing them. However if I then open one of the workbooks that has been saved by the macro and type a new date entry in a table (that has nothing to do with the data connections that were refreshed), it is formatted with a "custom" date format of m/d/yyyy, rather than the default date format used for the rest of the table (dd/mm/yyyy in my case).
Note that none of the cells containing existing dates are changed, and if you enter a date outside the table range it is formatted with the default date format.
Any ideas? We can work around by reformatting the cell, or the whole column, back to the default date format, but this is a pain and I would like to know why this is happening. (If I do the exact same operation manually, ie open workbook, refresh all data connections, save and close, then the problem doesn't arise.
Thanks!
Oliver.