Can I loop through a set of data and determine if the current item is within a range of each previous items? In the attached example photo, I have the data. I want to check the following:
If TextBox 24.Top is between TextBox 7.Top and TextBox 7.Bottom OR if TextBox 24.Left is between TextBox 7.Left and TextBox 7.Right. Check if either is true and return true.
Loop to the next TextBox
If TextBox 27.Top is between TextBox. 24.Top and TextBox 24.Bottom OR if TextBox 27.Left is between TextBox 24.Left and TextBox 24.Right
OR TextBox 27.Top is between TextBox.7.Top and TextBox7.Bottom OR if TextBox27.Left is between TextBox7.Left and TextBox7.Right. Check if any is true and return true.
Loop to the next TextBox
I am trying to get the IF/OR statement to grow so that each range of values from all the previous text boxes are checked against the current text box. Is this possible? I have this data stored in a collection as well using VBA. I am just not sure how to proceed. Thanks for reading!
If TextBox 24.Top is between TextBox 7.Top and TextBox 7.Bottom OR if TextBox 24.Left is between TextBox 7.Left and TextBox 7.Right. Check if either is true and return true.
Loop to the next TextBox
If TextBox 27.Top is between TextBox. 24.Top and TextBox 24.Bottom OR if TextBox 27.Left is between TextBox 24.Left and TextBox 24.Right
OR TextBox 27.Top is between TextBox.7.Top and TextBox7.Bottom OR if TextBox27.Left is between TextBox7.Left and TextBox7.Right. Check if any is true and return true.
Loop to the next TextBox
I am trying to get the IF/OR statement to grow so that each range of values from all the previous text boxes are checked against the current text box. Is this possible? I have this data stored in a collection as well using VBA. I am just not sure how to proceed. Thanks for reading!