Prev: Need a way to verify a string is present in 1-column array?
Next: Run Time Error on trying to save workbook
From: H.G. Lamy on 3 Feb 2010 09:38 Thank you for the correction, Chip! hgl "Chip Pearson" <chip(a)cpearson.com> wrote in message news:7jtim5lurl2hr5ijaap1j1org37m4enshp(a)4ax.com... > > The line that generates the random index is bad. Change > > N = Int(N) * Rnd + 1 > > To > > N = ((Int(R.Cells.Count) - 1) * Rnd) + 1 > > Cordially, > Chip Pearson > Microsoft MVP 1998 - 2010 > Pearson Software Consulting, LLC > www.cpearson.com > [email on web site] > > > > > On Tue, 2 Feb 2010 19:26:47 -0800 (PST), Greg Glynn > <gregoryglynn(a)gmail.com> wrote: > >>This kind-of works and kind-of doesn't. >> >>I have an 8 element test array and the code regularly generates 9 as >>its random index number. >> >>Greg
First
|
Prev
|
Pages: 1 2 Prev: Need a way to verify a string is present in 1-column array? Next: Run Time Error on trying to save workbook |