vba question

Status
Not open for further replies.

Duthoy Glenn

Usenet Archive
Joined
Sep 11, 2001
Messages
12
Reaction score
0
i have a data file with some dimensions from beams, how do i program a form to make the name of the beams appear in listbox1 the record length = 11, and the name of the beam are the first 6 bytes of every record (those 6 bytes hould appear in the listbox)

I know that this is a very stupid question for advanced vba programmers but i'm just a beginner so help me a little would you?

Thanks in advance
by the way, are there good books abouw vba in autocad, all those books for vba that I've seen are for f**king (sorry about that)
office
 
1 Read data from file line by line, assuming each record in data file occupies a line, like

BEAM01xxxxx
BEAM02xxxxx
....
2 Get first 6 characters as beam's name and list it in listbox

Private Sub LoadBeamListBox(fileName as String)

Dim strIn as String

Open fileName For Input As #1
Do Until EOF(1)
Input #1, strIn
strIn=Left(strIn,6)
ListBox1.AddItem strIn
Loop
Close#1

End Sub
"Duthoy Glenn" wrote:
i have a data file with some dimensions from beams, how do i program a form to make the name of the beams appear in listbox1 the record length = 11, and the name of the beam are the first 6 bytes of every record (those 6 bytes hould appear in the listbox)

I know that this is a very stupid question for advanced vba programmers but i'm just a beginner so help me a little would you?

Thanks in advance
by the way, are there good books abouw vba in autocad, all those books for vba that I've seen are for f**king (sorry about that)
office
 
Status
Not open for further replies.

Latest threads

Back
Top