View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Wiss Don Wiss is offline
external usenet poster
 
Posts: 300
Default Getting text file into a VBA string variable

On 5 Jan 2005, Francis Ang wrote:

"Don Wiss" wrote:

I'd like to read a short text string in from the hard disk and assign it to
a VBA string variable.


Try this

Open "C:\Myfile.txt" for input as #1
Input #1, ShortText
Close #1

Mystring=ShortText


Thank you. Input worked. I had been trying with Get in the middle and it
wasn't working.

Don <donwiss at panix.com.