Nice suggestion but nope.
put this in:
[CODE=vb]
P = CDbl(rs!P)
T = CDbl(rs!T)
Streams.Item(rs Name!Descriptio n).HInput = STMPTH(P, T)
[/CODE]
same error, same spot. I had attempted this in my previous issue and it did not resolve it either. Still tried (hell I tried everything else I can think of)
Just so you know, here is the thread I started back in june or july with...
User Profile
Collapse
-
STMPQH() also in the DLL (Pressure, Quality, return Enthalpy). I do not remember if that was one that threw an error or not. The issue is not calling these methods.
The previous issue was that the compiler would "forget" the value until you looked at it (that is the best way I can explain it). Basically, the run would throw an overflow and break. I would hover over the variable (say for example, pH) and the tooltip would...Leave a comment:
-
The Get H Property is not where the issue is. That is an example of my work around. the problem is in the first part.
As far as the sameas that simply checks to see if we had set that item's enthalpy to be equal to another item's. if it is use the other items. if not calculate.
And if you notice the overflow error is not occurring on the Get H Property it is occuring in the Set HInput Property (which is included at the...Leave a comment:
-
Overflow (Not a newbie question) VBA
First, let me start by saying I know what an overflow is (Too large of a value into something that can't hold it, i.e. 35000 into an int, or 0/0, etc).
Now to the issue. I have a class that I am trying to apply a value to one of its properties.
Code:... Streams.Item(rsName!Description).HInput = STMPTH(rs!P, rs!T) ... <in class> Property Let HInput(HInput As Double) 'Set the
-
Code:Private pP As Double 'Pressure of the stream Private pT As Double 'Temperature of the stream Private pH As Double 'Enthalpy of the stream Private pW As Double 'Flow of the stream Private pType As StreamType 'Type of stream: Steam, Water, Leak(Enum) Private pName As String 'Name of the stream Property Let P(P As Double) pP = P End Property Property Let T(T As
Leave a comment:
-
Eerie problem with compiler... need help
So I posted this before, but got no answer. I found a way around it but now my backway is doing the same problem.
Basically, in one of my get methods:
Code:Property Get H() As Double H = CalcH 'This was implemented as the "Back Way" and it fixed problem, before the code in CalcH was in here End Property Private Function CalcH() As Double If pH <= 0# And pT > 0# And
-
one way is to just to the following
Code:Close #1 Open "InputFile.Txt" For Input As #1 Dim I as Integer For I = 0 to DesiredLine-1 Line Input #1, X$ Next I Line Input #1, X$ Form1.TextBox1.Text = X$
Leave a comment:
-
all doubles as stated before. but to put it quite simply, access vba is acting like a little kid. if you aren't watching it (debugger locals window) it messes with you. It seriously forgets that H has any value and YES I am absolutely sure it is set, until you look at it in the debugger locals... then it says "oh yeah, stupid me, it has a value of 175, not 0".... How can I fix this, because its driving me nuts and I need this program to...Leave a comment:
-
VB in Access Problem (I think)
Ok, so I posted a question about an overflow error before. Now I realize its not just there.
Here's the situation, you really don't need the code because well I don't actually think its the code. I have a class called CStream, in there it has some variables (H, P, T, W) all as doubles with get and let procedures. In the H get, there is an if statement that checks to see if H is set, if not set, calculate via P and T, then return H... -
easy enough
basically its
Shell(pathname, window style)
pathname as string
window style i would recommend either
vbMaximizedFocu s -maximize it and focus
vbNormalFocus -open normal and focusLeave a comment:
-
out is defined as a Double, as with Eff (the function return value).
lets see the values would be:
STMPSH(pOut.P, pIn.S) returns 1231.0336228993 3 : Double
pIn.H : 1488.1436843042 5 : Double
pOut.H : 1292.7445069537 1 : Double
which if you do the calculations:
numer : 195.39917735054 1 : Double
denom : 257.11006140492 8 : Double
these two were used just to see if either the numerator...Leave a comment:
-
well you can always use shell commands to open up the file (same commands as say the command window) or you can CreateObject("P DF.PdfCtrl.5") (i think thats right) but the latter will view within your vb program. I think if you just want to open adobe to view a shell command would be easiestLeave a comment:
-
Overflow Error
Ok, I've been working on this for two days and have finally resulted to asking for help. I am designing a program for my work that will emulate the thermodynamic systems of a power plant. however, I have a very simple issue that I cannot seem to fix... here is the code snippet:
Property Get Eff() As Double 'Efficiency of the Turbine
If pType = HP Then
Dim I As Integer
Dim OutEnth As Double 'Enthalpy...
No activity results to display
Show More
Leave a comment: