Forum Home
Press F1
 
Thread ID: 34429 2003-06-13 00:47:00 MS Excel formatting with paste macro Eorr (2788) Press F1
Post ID Timestamp Content User
152073 2003-06-13 00:47:00 Hi all.

I've got stuck on this one: I frequently copy and paste data from internet pages into excel workbooks. For ages I simply copied the text, switched to Excel and clicked the 'paste' button, then selected the next sheet for the next lot. Works fine. But I assigned a simple macro to a new button in Excel to paste and then select the next sheet for me. Works OK but it changes the format of the date entry in my pasted text from day/month format to month/day format. This causes major problems thereafter (eg. 11th June becomes 6th Nov).
Any ideas anyone? Bear in mind there is a lot of text pasted at once, and I don't format it at all after pasting. Is there something I should do in my macro code that will paste using current format settings?
Eorr (2788)
152074 2003-06-13 12:34:00 For one I would check out your reional settings within control panel. mikebartnz (21)
152075 2003-06-15 21:56:00 Regional settings seem OK - the date format is fine for everything else - Access, with basic modules running, Outlook, Word all seem OK. It's just with the macro command "activeworksheet.paste" that seems to paste in the text wrong - using the standard toolbar button for paste works fine, so I replaced the paste command with "CommandBars("Standard").Controls("&Paste").Execute" in the macro to imitate the user actually clicking the paste button - works OK. So I haven't resolved the issue, but found a workaround.
Thought I'd let you know just in case someones watching this topic - and like happy endings too!
Eorr (2788)
1