I am struggling slightly with my indexing of my array. I want the upper bound of the array to be the amount of time's the Function RandomizeDice() executes. Any help is greatly appreciated.
![]()
Please Login or Register to view this content.
I am struggling slightly with my indexing of my array. I want the upper bound of the array to be the amount of time's the Function RandomizeDice() executes. Any help is greatly appreciated.
![]()
Please Login or Register to view this content.
As far as I can see, the index i is declared in both subroutines and i is not incremented in the RollDice routine. If you want both routines to use i, then either make it public or pass it as a parameter.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Not sure what your objective is.
This will roll the dice pair 10 times and put the results in three arrays.
![]()
Please Login or Register to view this content.
Last edited by AlphaFrog; 04-23-2017 at 03:36 PM.
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks