N
newbie
I wonder if some one can tell me what is wrong with my code?
I am having problems with the first line? I looked online and i
thought my syntax was correct?
Andrew
Function Process1(Reactant As Real, Yield As Real) As Real
Dim Reactant As Real
Dim Yield As Real
Set Cresult2 = 0
'Do
Set Reactant = Workbooks("Sayaka").Sheets("Sheet1").Range("D34")
Set Yield = Workbooks("Sayaka").Sheets("Sheet1").Range("D34")
Set Aresult = ((Reactant / 100) * (1 - Yield)) * 100
Set Bresult = ((Reactant / 100) * (1 - Yield)) * 200
Set Cresult = ((Reactant / 100) * (Yield)) * 300
........
End Function
I am having problems with the first line? I looked online and i
thought my syntax was correct?
Andrew
Function Process1(Reactant As Real, Yield As Real) As Real
Dim Reactant As Real
Dim Yield As Real
Set Cresult2 = 0
'Do
Set Reactant = Workbooks("Sayaka").Sheets("Sheet1").Range("D34")
Set Yield = Workbooks("Sayaka").Sheets("Sheet1").Range("D34")
Set Aresult = ((Reactant / 100) * (1 - Yield)) * 100
Set Bresult = ((Reactant / 100) * (1 - Yield)) * 200
Set Cresult = ((Reactant / 100) * (Yield)) * 300
........
End Function