Opening an HTML doc - inconsistent results manual vs macro.
Hello all.
I'm running Excel 2000 SP3 on Win98SE. I have several separate HTML documents generated by Papyrus Design Group "Grand Prix Legends" which contain tables of Track Names, Lap Times and Dates. I'm trying to import this data into Excel for analysis and presentation, but I'm having problems. If I manually open the HTML documents in Excel, I can easily copy & paste data from the HTML page into my tables, and the results are fine. However, I have tried to automate this process by recording a macro to: 1. open an HTML document, 2. select a range, 3. copy the data, 4. select the destination sheet and range, 5. paste the data, 6. close the HTML doc. This code is run from a command button on the destination sheet, using the "click" event. When the macro is run, some (not all!) of the dates in the table have their format corrupted. I've cut the macro down until there is only the "Workbooks.Open" statement left, and it appears that it is this open statement which is corrupting the data. After running this statement on its own, the open HTML document is displayed showing the corrupted dates. In the original HTML documents, the dates are all in dd/mm/yy format, but when Excel opens the documents with "Workbooks.Open", some of the dates get switched to mm/dd/yy format (e.g. 09/02/04 becomes 02/09/04). I have checked time and again that all the regional date settings I can find in Office 2000 and Win98 are set to "U.K. English" or equivalent, and yet this still happens. I am stumped. Can anyone give me a fix for this problem? And can anyone explain why I should get different results when manipulating the data manually vs using a macro? Thanks in advance for any help offered. -- Keith Ballard |
All times are GMT +1. The time now is 11:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com