All pastes #390749 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-03-11 17:32 UTC
rendered paste body
'----------------------------Variablen
Dim Count As Long
'Arrays deklarieren
Dim Schadstoff(), Motor(), Euro1() 'textarrayas
Public SC As Integer 'schleifen counter
Public pfad1 ' Pafd1 ist die textdatei euro1
Public DateiText As Integer
Public TC 'Hilfscounter für Texarray
 'Textinhlat der Euro1.txt
Public PfadEuro1


'--------------------------------------
Sub DimesionierenXLS()

Count = (Cells.SpecialCells(xlLastCell).Row) 'Anzahl der Zeilen werden ermittelt
ReDim Preserve Schadstoff(Count) 'schadstoff Array auf passende größe Dimensionieren
ReDim Preserve Motor(Count)      'Motorarray domensionieren
End Sub
Private Sub bEinstufen_Click()
'Gleicht ab zu welcher eurotxt die VAriable Schadstoff gehört

End Sub
Private Sub bTextlesen_Click()

Texteinlesen
End Sub
Private Sub bEinlesen_Click()

DimesionierenXLS
XLSEinlesen
End Sub
Sub XLSEinlesen() 'liest die eingegebenen der spalten G und H werte in variablen

SC = 0
For I = 1 To Count
        SC = SC + 1
        Schadstoff(SC) = Range("g" & SC).Value
        Motor(SC) = Range("h" & SC).Value
Next I
'Hilfsanweisung um zu sehen was in Schadstoff array ist
'For a = 1 To Count
'counter = counter + 1
'ausgabe = ausgabe & Schadstoff(counter) & vbCrLf
'Next a
'MsgBox ausgabe
End Sub

Sub Texteinlesen()
Dim TC 'Hilfscounter für Texarray
Dim Euro1()
PfadEuro1 = "C:\Dokumente und Einstellungen\StickyBit\Desktop\Schadstoff\Benzin_Euro1.txt"
TC = 0

Open PfadEuro1 For Input As #1
    Do While Not EOF(1)
        Line Input #1, sZeile
        TC = TC + 1
    Loop
Close #1
ReDim Preserve Euro1(TC)
'MsgBox "Die Textdatei hatt " & TC & " Zeilen"
'MsgBox "Das Textarry ist" & TC & " groß"

Open PfadEuro1 For Input As #1
Do While Not EOF(1)
    t = t + 1
    Line Input #1, sLine
    Euro1(t) = sLine
Loop
Close #1
'Hilfs Anweisung um zu sehen welcher Text in Euro1 ist
'For a = 1 To TC
'    counter = counter + 1
'    ausgabe = ausgabe & Euro1(counter) & vbCrLf
'Next a

'--------------------------------------------------------
End Sub