Sorry for the stupid question, but it seems the mistake is when I'm trying to call the function for the calculation. I do not do it the proper way i guess, and i get crazy results, or no results. How is the correct way for the below procedure?
Code:
Option Explicit
Dim EFCO2 As Long, CO2em As Long, x1 As Long, x2 As Long
CO2em = Emissions(x1, x2, EFCO2)
MsgBox "CO2 emissions = " & CO2em & " t"
Function Emissions(ENcat As Long, Ptech As Long, EFtech As Long)
Emissions = ENcat * Ptech * EFtech * 10 ^ 6
End Function