These declarations are probably not what you intend.
Dim k, a, b, c, d, s, fakulteta, fakultet As Integer
Dim i, f As Long
Dim x, result, taylor As Double
In VBA each variable must explicitly get a type, or it is Variant by default. I think you are assuming that the first line will all be Integer, the second line will all be Long, the third line will all be Double.
Dim k As Integer, a As Integer, b As Integer, c As Integer, d As Integer, s As Integer, fakulteta As Integer, fakultet As Integer
Dim i As Long, f As Long
Dim x As Double, result As Double, taylor As Double
Bookmarks