I have a user who is reporting a runtime error 5156 crashing the app. She claims that there is nothing else to the message. I can't find anything that might explain what this error means and I can't re-create it. Has anybody seen it before or know where I might look? I've tried to search the...
Thanks Jeff. Actually, the statement Set Add = skey was generated by the Class Builder utility. It's probable that the function was initially:
Public Function Add(objNewMember As note) As Note
. . . where Note is an object. Later, I probably changed the return to a string type:
Public...
Here's one I haven't seen. I hope somebody can help me.
I created a collection class using the Class Builder utility. I've been testing it in the development environment without a problem. When I hit Cntl+F5 to run it after a full compile, I get the subject error message.
Here's what it...
Does anyone have an example of code I could use to find the open forms within an MDI frame? This app creates unique instances of various forms. I'd like to determine whether a particular instance is already open on the frame and set focus to it instead of opening another that would have the same...
After posting the message I played around with the References on the project group. It turns out that was the problem. The user.vbp HAD changed but the RenewalLtr was in a classes.vbp that referenced user.dll
I apologize for wasting anyone's time. [peace]
I know we've all heard this before ;-), but I really didn't make any changes to these objects! Now I'm getting a Type Mismatch error on the bolded statement. I'd sure appreciate any ideas on how to isolate the cause of the problem. Thanks in advance.
Set RenewalLtr = New RenewalLetter...
Thanks for the response Josh. I open up a .vbg that's made up of three projects (.vbp). I thought that I had tried saving the projects separately once before. Maybe I wasn't paying attention. I'll try it again.
LOL if you want, but when I start up VB6, the same objects open up in editor windows every time -- regardless of which objects were visible when I saved the group. Why is that?
The menu item Project ==> References is driving me crazy. I hope someone can help. The project group consists of 4 projects. From that we make three dlls and one exe file. When I look at the Project References for the vbp (the one that I'll make into an exe) are three dll files that are...
Thanks, CCLINT. The key to your answer is that despite the fact that it's a runtime error, both the true and false parts are evaluated. I didn't think it would work that way at runtime.
There must be something odd about how the IIF function works. I still don't understand it, but the Val() function seems to solve the problem. Breaking out the condition into a standard IF...THEN...ELSE also works.
Thanks everyone!
Thanks, but the CInt is working fine and changing to CLng has no effect. When the County code number is selected (a number from 1 to 500 probably), the CInt or CLng converts the text to an integer. When the user selects "ANY" from the ComboBox, the statement is simply supposed to...
I'm sure this is a dumb question for you experienced VBers, but why do I get a runtime "Type Mismatch" error on this statement":
xPlan.CntyCd = IIf(IsNumeric(cmbCnty.Text), CInt(cmbCnty.Text), -1)
xPlan.CntyCd is defined as Integer
The ComboBox gives the user the option of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.