Is there a way to give a value to multiple variables (integers in this case), instead of all at once?
For instance, I have Dim aceVal, twoVal, threeVal, fourVa
I know this is an old thread, however I've just run into a similar issue myself - here's how I did it (I am only dealing with 4 values
Private Sub SetFalse(ByRef first As Boolean, Optional ByRef second As Boolean = False, Optional ByRef third As Boolean = False, Optional ByRef fourth As Boolean = False)
first = False
second = False
third = False
fourth = False
End Sub
this can be easily adapted, by making the first variable the required value (this code also looks a bit daft because I have to provide a default which can only be true or false, but obviously with integers or something it looks more meaningful.)