View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Jim Wickenhiser Jim Wickenhiser is offline
external usenet poster
 
Posts: 5
Default Increase your Karma Points -Help a newbie out

Hi Jim,

Worked perfectly. I stepped through your code and what you're doing is
much more elegant than my clumsy attempt. I did modify one thing though
(I can't help myself); since I know the maximum number of words, I put
an upper bound on lngNum. That way my wife can select the whole column
(or a subset) without any negative consequence.

Here's my addition (in my code upperBound is actually declared as a
Const but I put it here for clarity):


varWordBingo = Excel.Selection.Value
UPPER_BOUND = 102
lngNumTemp = UBound(varWordBingo, 1)
If upperBound < lngNumTemp Then
lngNum = UPPER_BOUND
Else
lngNum = lngNumTemp
End If


Thus ends my temporary foray into VB; thank you all very much for your
help and if you need some Verilog help let me know. :)

-Jim Wick

Jim Cone wrote:
Jim,
I have modified my "BibleBingo" code to do what you want. (I think).
It chooses values at random from the selection and fills the range.