🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #7016

Re: VBA: LOF maximum lengte 2048 ?

#7016
From: Hace
Date: Fri, 25 Oct 2002 12:21
32 lines
1980 bytes
Bart Vanwijnsberghe schreef:

>Private Sub Form_Load()
>    Dim file As String
>    file = "D:\Mijn documenten\testAccess\test.html"
>    Open file For Input As #1
>    FileLength = LOF(1)
>    Debug.Print FileLength
>    mailtekst.SetFocus
>    mailtekst.Text = Input(LOF(1), #1)
>    Close
>End Sub
>Is er een andere mogelijkheid om een grotere file in te lezen ?

Je kunt de file per regel of per byte proberen in te lezen, door een
loopje te gebruiken en te testen op EOF (end of file).

Bijvoorbeeld iets als:

Open sFileName For Input As #1
Do While Not EOF(1)
  Line Input #1, strRegel
  mailtekst.Text = mailtekst.Text & strRegel
Loop
Close #1

Cheers,

-- 
  anti-rsi software at: http://hace.dyndns.org/files/rsibreakreminder/
  Learning to quote with outlook express:
  http://home.in.tum.de/~jain/software/quotefix.php
Technical Details
Message-ID: <3dbb3697.1996781@192.168.0.1>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!skynet.be!skynet.be!cleanfeed.casema.net!leda.casema.net!amsnews01.chello.com!amstwist00.POSTED!not-for-mail
References: <bmYt9.177078$8o4.28363@afrodite.telenet-ops.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,dc7e0de2aed95b63
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,dc7e0de2aed95b63
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2002-10-25 05:38:06 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!skynet.be!skynet.be!cleanfeed.casema.net!leda.casema.net!amsnews01.chello.com!amstwist00.POSTED!not-for-mail
User-Agent: Hamster/1.3.23.3
From: hace_x@yahoo.com (Hace)
Newsgroups: be.comp.programming,nl.comp.programmeren
Subject: Re: VBA: LOF maximum lengte 2048 ?
Message-ID: <3dbb3697.1996781@192.168.0.1>
References: <bmYt9.177078$8o4.28363@afrodite.telenet-ops.be>
X-Newsreader: Forte Agent 1.5/32.452
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 32
Date: Fri, 25 Oct 2002 12:21:12 GMT
NNTP-Posting-Host: 62.194.68.94
X-Complaints-To: abuse@chello.com
X-Trace: amstwist00 1035548937 62.194.68.94 (Fri, 25 Oct 2002 14:28:57 MET DST)
NNTP-Posting-Date: Fri, 25 Oct 2002 14:28:57 MET DST