I'm using a macro to do a simple copy and paste of a website page (whole page in Internet Explorer). I call up IE and navigate using the VBA macro. Part of the data shows expressions like '1 / 2' or ''2 / 3' which is saying 'one out of two' and 'two out of three', etc.
The problem is when they are pasted on a worksheet, excel converts them to dates such as '1-Feb' or '2-Mar' . Don't want this.
I tried to pre-format the cells to text before running the macro, but it didn't work. It gave me a 5 digit date # ?
How do I disable the date recognition using a macro to copy from a website?
I am not using 'web query' by the way, and I know how to disable the date recognition by this method.
I'm using the following code basically:
' grab the whole screen & paste into Excel
ie.ExecWB OLECMDID_SELECTALL, OLECMDEXECOPT_DONTPROMPTUSER
ie.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT
'Wait for page to load!
Do
If ie.ReadyState = 4 Then
ie.Visible = False
Exit Do
Else
DoEvents
End If
Loop
ie.Quit
ActiveSheet.Paste
thanks for your help.
Bookmarks