Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Import text onto form

Hi all!

I have a text file(notepad) for example in c:\
This text file has 20 rows or more.
How can I import the data in each row into a VBA form.
Or just how can i reference the data in that text file so that i can
make an array of strings which would get their values(text).
Thanks!!

Marko Svaco,
Croatia

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Import text onto form

I thought you might have to resort to an old-fashioned style method and
some code I found of Chip Pearsons seems to back that up:

Sub ReadTheTextFile()

Dim S As String
Open "H:\TextFileName.txt" For Input As #1 ' change filename
Do Until EOF(1)
Line Input #1, S
Debug.Print S
Loop
Close #1

End Sub

.....the above writes each line of the text file to your immediate
window but maybe you can adapt, by changing the line "Debug.Print S" to
fit your needs

Rgds
J



On Nov 3, 12:50 pm, "Marko Svaco" wrote:
Hi all!

I have a text file(notepad) for example in c:\
This text file has 20 rows or more.
How can I import the data in each row into a VBA form.
Or just how can i reference the data in that text file so that i can
make an array of strings which would get their values(text).
Thanks!!

Marko Svaco,
Croatia


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Import text onto form

Thanks for the quick reply!!
I think that it will work great!
Thanks!

Marko Svaco,
Croatia

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
Import text from Word Form to Excel CBER Excel Discussion (Misc queries) 1 September 13th 07 04:52 PM
no way to import user form into vb6? ziociccio[_2_] Excel Programming 0 August 11th 05 08:59 AM
can you import an mp3 to VB in Excel '03 to be played when a form. alan5022 Excel Programming 2 March 2nd 05 08:24 PM
Import form from Access? Lazy Excel Programming 1 January 30th 04 12:57 PM


All times are GMT +1. The time now is 11:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"