As Jon comments, if you don't read the text file into Excel directly, you
could use the "Scripting.FileSystemObject" (the FSO he refers to) to work
with the text file. In fact, the object "MSXML2.XMLHTTP" has a
'ResponseText' property that might allow you to fetch the text directly from
the web page.
Going back to your original issue, I suspect there are typographical errors
on the web page that somehow get disguised by Notepad (perhaps because of
the font choice) and then only get revealed after placing the text in Excel.
That's just a guess.
Steve Yandl
You are right it isn't a default behavior and it is a VBA subroutine.
It is an export of information from a website which is a custome
export which is saved as a .txt file. Because the file is a .txt file
it is opened in notepad to select all and copy the information for the
ability to paste it into the excel spreadsheet using the vba
subroutine to select cells and paste the information. The .txt file
has the informaiton correct, but the pasted cells change text to
numbers or leave out text all together.
I use Office Pro 2003 while others may still be using earlier versions
of the Excel. Would the FSO still allow this spreadsheet to be
backwards compatible? How would I go about having the script copy
information without first knowing where the information is?
The way I was trained to use the system was to use the notepad to
'copy' the info to be loaded into the spread sheet. The website only
allows information download with an export with certain fields of
information. The file is downloaded and saved on the users computer,
which changes the file name each time it is downloaded, and then using
notepad to open the file, select all, and copy all the data with a
right click, and then click on a button on the worksheet of the
spreadsheet with a macro to paste the information into spreadsheet.
The information is then placed into necessary cells of the spreadsheet
by excel commands like ='worksheet1'!C9.
The typo errors seems plausible, but I still wonder why it would leave
out characters as well as change them.