osubuckeye2007
New Member
- Joined
- Mar 19, 2013
- Messages
- 9
I have an array that is made up of inputs from a UserForm
there are 18 boxes but sometimes we only need to use the first few. I'd like to leave the unused ones blank, but this causes the array to look like so:
and my code will not work with the empty values
our current solution has been to place "0" in the unused boxes, so that the array looks like so:
But this causes some other undesired effects.
is there a way that I could take that array and eliminate the blanks? they are always at the end.
otherwise, is there a way to make the use of this array just stop at the last blank? currently the array is being used with this code
either solution should work
Code:
[B]FieldWidths = Array(InputForm.TextBox1.Value, InputForm.TextBox2.Value, InputForm.TextBox3.Value, ...)[/B]
there are 18 boxes but sometimes we only need to use the first few. I'd like to leave the unused ones blank, but this causes the array to look like so:
Code:
[B]Fieldwidths = (10,24,8,15,,,,,,,...)[/B]
and my code will not work with the empty values
our current solution has been to place "0" in the unused boxes, so that the array looks like so:
Code:
[B]Fieldwidths = (10,24,8,15,0,0,0,0,0,0...)[/B]
But this causes some other undesired effects.
is there a way that I could take that array and eliminate the blanks? they are always at the end.
otherwise, is there a way to make the use of this array just stop at the last blank? currently the array is being used with this code
Code:
[B]For i = 0 To UBound(FieldWidths)
[/B]
either solution should work