PC Review


Reply
Thread Tools Rate Thread

Cant seem to load an array from a file

 
 
Mike
Guest
Posts: n/a
 
      12th Dec 2003
'Declare array to load file
Dim mstrCarinfo(9, 3) As String

'Declare streamreader
Private datvehiclelookup As StreamReader

Private Sub Loadarray()
' Load Array
Dim intCol As Integer
Dim intRow As Integer

Do Until datvehiclelookup.Peek = -1
For intRow = 0 To 9
For intCol = 0 To 3

mstrCarinfo(intRow, intCol) =
datvehiclelookup.ReadLine

Next intCol
Next intRow
Loop
End Sub
 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      12th Dec 2003
"Mike" <(E-Mail Removed)> schrieb
> 'Declare array to load file
> Dim mstrCarinfo(9, 3) As String
>
> 'Declare streamreader
> Private datvehiclelookup As StreamReader
>
> Private Sub Loadarray()
> ' Load Array
> Dim intCol As Integer
> Dim intRow As Integer
>
> Do Until datvehiclelookup.Peek = -1
> For intRow = 0 To 9
> For intCol = 0 To 3
>
> mstrCarinfo(intRow, intCol) =
> datvehiclelookup.ReadLine
>
> Next intCol
> Next intRow
> Loop
> End Sub


Do you get a compile error or a runtime exception? Which one? Do you create
a StreamReader somewhere? How is the array written to the file?


--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load selection into an Array - VBA brittonsm Microsoft Excel Programming 4 5th Jun 2008 02:51 AM
Load into Array rather than Hard Coded Paul Black Microsoft Excel Programming 14 21st Aug 2007 11:38 AM
How do you dynamically load an array? =?Utf-8?B?aGF2b2NkcmFnb24=?= Microsoft Excel Programming 2 24th Oct 2006 07:26 PM
load array into combo box =?Utf-8?B?QmFsYQ==?= Microsoft ASP .NET 1 29th Dec 2004 08:25 PM
Load an array, sort it, write it to a text file =?Utf-8?B?Q2hyaXM=?= Microsoft Access Form Coding 11 4th Aug 2004 08:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:46 AM.