Answer:
In this case, there is an error in EXCEL VBA that cannot be fixed from our side. For this reason, a new object, RFEM.RfLine (instead of RFEM.Line) has been created, which you can use to continue your work. Here is a brief example:
Sub test_RfLine()
Dim iModel As RFEM5.IModel2
Set iModel = GetObject(, "RFEM5.Model")
iModel.GetApplication.LockLicense
On Error GoTo e
Dim iModelData As RFEM5.IModelData2
Set iModelData = iModel.GetModelData
Dim lines() As RFEM5.RfLine
lines = iModelData.GetLines
e: If Err.Number <> 0 Then MsgBox Err.Description, , Err.Source
Set iModelData = Nothing
iModel.GetApplication.UnlockLicense
Set iModel = Nothing
End Sub