OMG this did it haha. I used basically this but in a slightly different way and it worked. Thank you so much! I'm still noobish at this so I truly appreciate all of the help
This is another argument for the if/then/elseif ladder at both formula selection time, and at calculation time.
At Selection time set up your reusable text boxes and Labels.
At Calculate time do your multiple calculations and distribute the results into the Labels you set up at Selection time.
Not every formula requires input into all 3 text boxes. If the text blocks are left empty you get a message saying the operation yail-divide can not accept the accept the arguments:"....". If you change the text boxes so that they all are 0 then you get an error 3200 message if any of the boxes still contain the 0.
I tried to do an if/then box as pictured below to disable the empty text boxes but it doesn't seem to work. Any other thoughts on how to either ignore or disable an empty text box?
I also tried if the textbox is empty evaluate but ignore the result and that didn't seem to work either.
In your formula list (for example):
but all other formulas will generate a runtime error. You need to take @ABG's advice
So would I need to do this for like every single equation and would it still remain under when button1 click ?
I started a skeleton app for you, but I have to break off for a day or two.
I hope there is enough there for you to get a table based idea going for the input setup.
multicalc.aia (4.6 KB)
Ah okay, I think I got an idea of what to do with it. I'll give it a go and see what I can put together to get it to work. Truly appreciate you taking the time to help a noob like me out haha.
So I was definitely straining my brain a little too much with the error 3200 message. I ended up figuring out a work around without having to if/then all of my formulas and equations. I just made it ignore the error message. Now the app works as intended and I do not get any errors if 0 is left in any of the text boxes.
For what it's worth, here is a sample multipurpose calculator framework loaded with a few math formulae ...
These global variables support the framework ...
The framework variables don't need to change as the formula list expands, unless a new formula exceeds the current limit on inputs or outputs.
These variables keep setup information for the formulas, by name:
The above dictionaries are used to set up the input area after choosing a calculation type.
multicalc.aia (8.0 KB)
It bothered me that this Click event had to count text box locations to line them up with their parameter names, so I figured out how to do that automatically, making the code easier to read and more reliable.
Old Event:
New Event, with added support functions:
Note that even if multiple formulae reuse the same input prompts, this will still work.
multicalc.aia (9.0 KB)
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.