10-26-2021
09:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-26-2021
09:22 AM
So you aren't using the less than or equal to correctly. See modified code below:
If structural_opening_width <= 2500 'less than or equal to
headbox_depth = 125
headbox_length = 150
Else If structural_opening_width <= 5000 'less than or equal to, but does not match the first condition
headbox_depth = 125
headbox_length = 150
Else 'None of the conditions matched. Some people don't like using this kind of statement, but it's fine for this kind of aplication
End If
I added comments to help clarify things, but and if statement will step through each chaeck and act on the first match. So the first condition is opening being less than or equal to 2500, if that fails it checks the next condition, in this case it is opening is less than or equal to 5000. [and failed the first condition, so the opening is greater than 2500]
You keep adding Else If [condition] for each condition you want to check, then you can either end there or add an open Else "Condition", which is only entered if none of the previous condtions work.
If you have any other questions feel free to ask.