Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21162

Reading Text files into Textboxes

$
0
0
Hi All

I am trying to read a text file into text boxes this is the contents of the text file below, in the text file its on two lines and there are tabs and spaces between it item has well, but I went to pick pacific items from the text file to put in pacific text boxs, :-

HANDLE BLOCKNAME SHEET_TYPE SHEET_SIZE F_DWG_NO_1 SHT_CUR SHT_TOT PART_NO BT_NO DATE_TTL DIVISION PLANT PL_CD DEPT# OP_NO STA_NO DRAW_TTL_L1 DRAW_TTL_L2 SHT_TTL_L1 SHT_TTL_L2 DES DET CHK SAF_T PO_NO V_NAME UCCS V_JOB_NO V_DWG_NO CAD_FILE ACAD_REL
'435B SHEET1_A2M A2 046ZE00LD12XXX 010 030 1745L 6/9/13 ENGINE XXXXXXX GB-03 LD8006 220 OP220 CAMERA & LASER ENCLOSURE XXX XXXX LASER MARKING DOOR U CHANNEL & SENSOR BRACKETS AC/DCB AC DCB PO96-13.001 APTL JN2357 JN2357GA 046ZE-00LD-12854-010 LT2000

this is the code I got so far

Dim j As Long
Dim l() As String
Dim f() As String

l = Split(ReadFile("S:\Text Files 2\" & File1.List(File1.ListIndex))) ', vbNewLine)

f = Split(l(1)) ' get the first line, you must do check to ensure l(0) contains valid inputs.
Text1.Text = l(0)
' Text11.Text = l(0)
Text2.Text = l(1)
' Text12.Text = l(4)
Text3.Text = l(5)
' Text14.Text = l(5)
Text4.Text = l(6)
' Text15.Text = l(6)
Text5.Text = l(7)
' Text16.Text = l(7)
Text9.Text = l(2)
Text10.Text = l(1)
Text8.Text = l(3)
' Text13.Text = l(3)
' Label16.Caption = l(8)

regards

steve

Viewing all articles
Browse latest Browse all 21162

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>