AW: Makro durch Enter starten
07.12.2004 16:22:03
Jens
Hallo,
Danke für die schnelle antwort.
Aber ich denke meine Vorstellungen sind etwas komplizierter!
Ich habe hier eine Datei angehängt, ich hoffe man kann sie öffnen, die mein vorhaben hoffentlich etwas besser erklärt.
Zusätzlich hier noch der bereit vorhandene Cuellcode: (allerdings nicht von mir erstellt)
Option Explicit
Sub GuardusMWAus()
Dim SN As String
Dim Trenn As String
Dim Pos As Range
Dim GFname As String
Dim GPath As String
Dim FContent As String
Trenn = ";"
Set Pos = Application.ActiveCell
FContent = Trenn & Format(Cells(Pos.Row, 5).Value, "YYYYMMDD") 'datum
FContent = FContent & Format(Cells(Pos.Row, 6).Value, "HHMMSS") 'uhrzeit
FContent = FContent & Trenn & Cells(Pos.Row, 1).Value 'Messwert1 Spannung Messrichtung
FContent = FContent & Trenn & Cells(Pos.Row, 2).Value 'Messwert2 Spannung Gegenrichtung
FContent = FContent & Trenn & Cells(Pos.Row, 9).Value 'Messwert3 Differenz
FContent = FContent & Trenn
SN = Cells(Pos.Row, 7).Value
FContent = Replace(FContent, ",", ".")
GFname = "RW" & SN & ".txt"
GPath = "c:\GMesswert\"
Open GPath & GFname For Output As #1
Print #1, FContent
Close #1
'Ausgeführte Zeile formatieren
Range("A2:I2").Select
Range("I2").Activate
With Selection.Interior
.ColorIndex = 50
.Pattern = xlSolid
End With
Selection.Font.Bold = True
Range("J3").Select
End Sub