range

M

MarcoPolo

I have a file txt that i need to import into an array
I know i can do it in excel setting a rng and stroing into a variant

But in word?
 
J

Jezebel

Dim pFileNum as long
Dim pArray as string

pFileNum = freefile
Open "C:\asdasdasd.txt" for input as pFileNum
pArray = Split(input(LOF(pFileNum),pFileNum),vbCr)
close pFileNum
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top