View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Steve Yandl Steve Yandl is offline
external usenet poster
 
Posts: 284
Default Notepad Visual Basic and Excel

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


wrote in message
...
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.


On Jan 7, 8:48 pm, "Steve Yandl" wrote:
When you write "The way it is supposed to work ", what is the "it" you're
referring to. The behavior you describe certainly isn't default behavior
for Office 2003 so I have to assume you're talking about some user
protocol
or perhaps a VBA subroutine. If this is a VBA routine, is there some
reason
why Notepad is even being brought into the mix?

Steve

wrote in message

...



I have office professional 2003. The way it is supposed to work is
file is saved as a .txt file and opened in Notepad. Select all and
copy from Notepad. Open the Excel Spreadsheet and use the Visual
Basic Code to paste the information into Excel. It works well and
good except for 6 cells which all do a similar change. Inc. in the
notepad becomes Ic. in Excel, Main in notepad becomes Mai in Excel, or
All becomes A11 in excel. Any suggestions.- Hide quoted text -


- Show quoted text -