Moderatori: Anthony47, Flash30005
Sub Caricamento()
abc = Shell("""" & "C:\Database\CreaElenco.Bat" & """", 2)
Open "C:\Database\Elenco.cfg" For Input As #1
Do Until EOF(1)
Line Input #1, Riga0
Open "C:\Database\" & Riga0 For Input As #2
Do Until EOF(2)
Line Input #2, riga
Ev = Mid(riga, 1, 6)
If Ev = "serial" Then
VF = Mid(riga, 8, 12)
If Sheets("Controllo").Cells(2, 1).Value = VF Then MsgBox " Valore " & VF & " Uguale"
End If
Loop
Close #2
inpfile = "C:\Database\" & Riga0
outfile = "C:\Database\Archivio\" & VF
On Error Resume Next
FileCopy inpfile, outfile
Kill "C:\Database\" & Riga0
On Error GoTo 0
Loop
Close #1
End Sub
del C:\Database\Elenco.txt
del C:\Database\Elenco.cfg
dir /B C:\Database\Prova.txt > C:\Database\Elenco.txt
copy C:\Database\Elenco.txt C:\Database\Elenco.cfg
exit
[L’estensione rar è stata disattivata e non puó essere visualizzata.]
Do While f.AtEndOfStream = False
Read = f.ReadLine
If Left(Read, 7) = "serial" then
CodiceSeriale = Mid(Read, 8)
Exit Do
End If
f.Close
If CodiceSeriale = Range(CodiceDaVerificare) then
msgbox "Il codice è uguale!"
Else
msgbox "Il codice è diverso!"
End If
Set f = Nothing
Set fso = Nothing
Exit Sub
Sub Pietrol()
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim FileName As String
Dim fso, f
Dim Read As String
Dim Found As Boolean
Found = False
FileName = "C:\database\prova.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(FileName, ForReading)
Do While f.AtEndOfStream = False
Read = f.ReadLine
If Left(Read, 6) = "serial" Then
CodiceSeriale = Mid(Read, 8)
Exit Do
End If
Loop
f.Close
If CodiceSeriale = Worksheets("Controllo").Range("A2").Value Then MsgBox "Il codice è uguale!"
Set f = Nothing
Set fso = Nothing
Exit Sub
End Sub
Torna a Applicazioni Office Windows
Come evidenziare aree separate di un foglio Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 18 |
Inserire add.in nella barra di avvio veloce in excel 2003 Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 4 |
Excel: problema con date se devo unirle a testi Autore: valle1975 |
Forum: Applicazioni Office Windows Risposte: 5 |
confrontare e evidenziare 2 fogli excel Autore: niccia |
Forum: Applicazioni Office Windows Risposte: 7 |
Visitano il forum: Nessuno e 26 ospiti