Option Explicit
Sub Test()
Const cOBERSTE As Long = 3 'Zahl der obersten Zeile
With Sheets("Log-Data").Cells(cOBERSTE, 1)
'oberste Zeile leer?
If Application.CountA(.EntireRow) = 0 Then
'erster Eintrag
.Resize(1, 17).Value = WerteTest(1)
Else
'nach unten
.CurrentRegion.Cut .Offset(1)
'
With Sheets("Log-Data").Cells(cOBERSTE, 1)
'hochzählen
.Resize(1, 17).Value = WerteTest(.Offset(1).Value + 1)
End With
End If
End With
End Sub
Private Function WerteTest(Zahl) As Variant
Dim Arr(1 To 1, 1 To 17) As Variant
Arr(1, 1) = Zahl
Arr(1, 2) = Format(Now, "dd.mm.yy")
Arr(1, 3) = Format(Now, "hh:nn:ss")
Arr(1, 4) = Worksheets("Log-Entry").Cells(7, 4)
Arr(1, 5) = Worksheets("Log-Entry").Cells(8, 4)
Arr(1, 6) = Worksheets("Log-Entry").Cells(6, 4)
Arr(1, 7) = InputBox("Used Frequency in MHz like 145000,00")
Arr(1, 8) = InputBox("Used Frequency Band in m like 2m")
Arr(1, 9) = InputBox("Used Mode like FM, DMR...")
Arr(1, 10) = "none"
If InStr("FMDMR", UCase(Arr(1, 9))) > 0 Then _
Arr(1, 10) = InputBox("Eventually used Relais in FM or DMR...")
Arr(1, 11) = InputBox("Received Signal Level")
Arr(1, 12) = InputBox("Transmitted Signal Level")
Arr(1, 13) = InputBox("Callsign of OM/YL")
Arr(1, 14) = "none"
If Arr(1, 10) = "DMR" Then _
Arr(1, 14) = InputBox("DMR-ID of OM/YL")
Arr(1, 15) = InputBox("Country of OM/YL")
Arr(1, 16) = InputBox("Quality of QSO")
Arr(1, 17) = InputBox("Eventually Notes to the QSO")
WerteTest = Arr
End Function
|