:wave: Hi
I´ve got small problem. I´ve got a return of 0 to 156
does anyone knows how I can change this return to 156 to 0
Lee
Printable View
:wave: Hi
I´ve got small problem. I´ve got a return of 0 to 156
does anyone knows how I can change this return to 156 to 0
Lee
Where do you "store" your returns? If it's an array then loop backwards:
VB Code:
For i = Ubound(arReturns) To 0 Debug.Print arReturns(i) Next i
no maybe i put it wrong
i'm doing calculations on picture box X,Y and return a # betwen 0 and 156
But I need to REVERSE the VALUE, I need A# betwen 156 and 0
Sorry but I have no clue about what you're after ... :confused:
If you can just ellaborate a little more ...
this would work but not practical
Public Function Lookup(x%)
Select Case x
Case 0
Lookup = 156
Case 1
Lookup = 155
Case 2
Lookup = 154
Case 3
Lookup = 153
Case 4
Lookup = 152
Case 5
Lookup = 151
Case 6
Lookup = 150
Case 7
Lookup = 149
Case 8
Lookup = 148
Case 9
Lookup = 147
Case 10
Lookup = 146
Case .............So on
End Select
End Function
:eek2:
Lookup = 156 - x%
Lookup = Abs(x - 156)
Of course. :blush:Quote:
Originally Posted by Cander
:lol:
You just had to do it the hard way.
;)
Yes, I was overthinking the problem.
Truth be told, it was my first thought as well. :eek2:
couldn’t see 4 looking :blush:
A big Thank you from lee 2 you all :lol: