Hello there
I have tried to get this to work, but it comes with this error: Run-time error '28': Out of stack space
My error comes in this line: ElseIf P() > 0 And IB() > 0 Then
Coming in Function UT.
The error is comes then some value is missing. I have tried to search for the error, but all I found is Application.EnableEvents = False and Application.EnableEvents = True. I have tried to put it in this Functions, but still same error. So hope You guys can handle it, cause I can't.
Thank you.
I have tried to get this to work, but it comes with this error: Run-time error '28': Out of stack space
VBA Code:
Private Function UT() As Double
Application.Volatile
Dim ws As Worksheet
Set ws = Worksheets(Sh)
If IsNumeric(ws.Range("B5").Value) And ws.Range("B5").Value <> "" Then
UT = ws.Range("B5").Value
Exit Function
ElseIf P() > 0 And IB() > 0 Then
UT = Round(P() / IB(), RN)
Exit Function
End If
End Function
VBA Code:
Private Function IB() As Double
Application.Volatile
On Error GoTo 0
Dim ws As Worksheet
Set ws = Worksheets(Sh)
If IsNumeric(ws.Range("B6").Value) And ws.Range("B6").Value <> "" Then
IB = ws.Range("B6").Value
Exit Function
ElseIf P() > 0 And UT() > 0 Then
IB = Round(P() / UT(), RN)
Exit Function
End If
End Function
VBA Code:
Private Function P() As Double
Application.Volatile
Dim ws As Worksheet
Set ws = Worksheets(Sh)
If IsNumeric(ws.Range("F5").Value) And ws.Range("F5").Value <> "" Then
P = ws.Range("F5").Value
Exit Function
ElseIf UT() > 0 And IB() > 0 Then
P = Round(UT() * IB(), RN)
Exit Function
End If
End Function
My error comes in this line: ElseIf P() > 0 And IB() > 0 Then
Coming in Function UT.
The error is comes then some value is missing. I have tried to search for the error, but all I found is Application.EnableEvents = False and Application.EnableEvents = True. I have tried to put it in this Functions, but still same error. So hope You guys can handle it, cause I can't.
Thank you.