🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #390

Re: copiare tutto dalla 7 riga

#390
From: Papais Elio Enzo
Date: Fri, 19 May 2006 16:45
52 lines
2499 bytes
Mi scuso per averti risposto male ma ti assicuro che il codice funziona.....
se tu crei un file con su scritto:
riga 1
riga 2
riga 3
riga 4
riga 5
riga 6
riga 7
riga 8
riga 9
lo chiami fileprov
lo salvi
copia il codice seguente:

Dim TextLine
Open App.Path & "\FILEPROV" For Input As #1   ' Apre il file.
    Do While Not EOF(1)   ' Ripete fino alla fine del file.
    Line Input #1, TextLine   ' Assegna la riga a una variabile.
    If conta > 6 Then
             Debug.Print TextLine          ' Scrive nella  finestra 
Immediata.
    End If
    conta = conta + 1
 Loop
 Close #1   ' Chiude il file.

Lo incolli in un nuovo progetto nella routine formload
vedrai che funziona e ti fara' vedere nella finestra di debug:
riga 8
riga 9
 ed e' normalissimo che ti faccia vedere solo la riga8 e la riga9.
anzi tagliamo la testa al toro.....
www.infoportal.it/esempio.zip
piu' di cosi' non so che fare...


"Brian" <brian@email.it> ha scritto nel messaggio 
news:jb%ag.384$mJ1.271@tornado.fastwebnet.it...
> ciao ragazzi, volevo chiedervi come faccio a copiare solo dalla settima 
> riga in poi un file:
>
> Open "C:\file.txt" For Output As #1
>
> 'qui vorrei prendere tutto quello che c'e dalla settima riga in poi
>
> close #1
>
> 'qui invece ricopiare i dati presi in un altro file
>
> Grazie
> 
Technical Details
Message-ID: <446df632$0$14786$4fafbaef@reader4.news.tin.it>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.news.tin.it!spool.news.tin.it!not-for-mail
References: <jb%ag.384$mJ1.271@tornado.fastwebnet.it>

Show Full Headers
Complete Article Headers
X-Google-Thread: f94ee,482be90f581e92e7
X-Google-Attributes: gidf94ee,public
X-Google-Language: ITALIAN,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.news.tin.it!spool.news.tin.it!not-for-mail
From: "Papais Elio Enzo" <support@infoportal.it>
Newsgroups: free.it.visual-basic
References: <jb%ag.384$mJ1.271@tornado.fastwebnet.it>
Subject: Re: copiare tutto dalla 7 riga
Date: Fri, 19 May 2006 18:45:59 +0200
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-Antivirus: avast! (VPS 0620-3, 19/05/2006), Outbound message
X-Antivirus-Status: Clean
Lines: 54
Message-ID: <446df632$0$14786$4fafbaef@reader4.news.tin.it>
Organization: TIN.IT (http://www.tin.it)
X-Comments: Please send technical notifications to newsmaster@tin.it
NNTP-Posting-Host: 82.48.141.170
X-Trace: 1148057138 reader4.news.tin.it 14786 82.48.141.170:3500
X-Complaints-To: Please send abuse reports to abuse@tin.it