Option
Explicit
Private
Sub
NewEntry_Click()
Const
cOBERSTE
As
Long
= 3
With
Sheets(
"Log-Data"
).Cells(cOBERSTE, 1)
If
Application.CountA(.EntireRow) = 0
Then
.Resize(1, 17).Value = Eingaben(1)
Else
.EntireRow.Insert shift:=xlDown
With
Sheets(
"Log-Data"
).Cells(cOBERSTE, 1)
.Resize(1, 17).Value = Eingaben(.Offset(1).Value + 1)
End
With
End
If
End
With
End
Sub
Private
Function
Eingaben(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
UCase(Arr(1, 9)) =
"DMR"
Then
_
Arr(1, 14) = InputBox(
"DMR-ID of OM/YL"
)
If
InStr(
"FMDMR"
, UCase(Arr(1, 9))) > 0
Then
Arr(1, 9) = UCase(Arr(1, 9))
Arr(1, 15) = InputBox(
"Country of OM/YL"
)
Arr(1, 16) = InputBox(
"Quality of QSO"
)
Arr(1, 17) = InputBox(
"Eventually Notes to the QSO"
)
Eingaben = Arr
End
Function