+ Reply to Thread
Results 1 to 5 of 5

macro created buttons not working, random numbers not random

  1. #1
    Forum Contributor
    Join Date
    07-01-2017
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 2013
    Posts
    132

    macro created buttons not working, random numbers not random

    I am experiencing an issue with a presentation I am working on. Here is the link to the file. [URL="https://drive.google.com/open?id=0Bz1Rhg3Y5y5KZzRtOHE3dkFxYnM"]

    So you can understand the presentation heres how its set up. Its only two slides.
    Slide one, only one shape that runs the macro "Start"
    Slide two, has 6 stacks of 52 playing cards each, (labeled like AAC which would mean stack A, Ace of Clubs, and E10S for Stack E 10 of Spades)

    Question 1: The presentation has a button on page one that sends you to page 2. It also creates random numbers that determine specific cards that are displayed. I am seeing that every time I run the program the cards are always the same. Repeating the program will display different cards but each time I start the program again the same cards are appearing.

    for example time one will display 10 & 3
    time two will display 7 & 8
    time three will display 4 & 4

    but if I close the program and start it again it will start again with 10 & 3.

    Is there a fix?

    Question 2: the VBA code creates action buttons that will run macros. However if I run the presentation, the buttons are not clickable. Heres the interesting part, if I exit the presentation and reopen the same page, the buttons are clickable, however they still don't function correctly.

    I know the code isn't 100% complete, but its long and I don't want to keep repeating the problem. Any help would be greatly appreciated.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,986

    Re: macro created buttons not working, random numbers not random

    .
    I couldn't get your project to run here ... not certain why, so I couldn't test the following.

    Try adding
    Please Login or Register  to view this content.
    in the refresh Sub.

  3. #3
    Forum Contributor
    Join Date
    07-01-2017
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 2013
    Posts
    132

    Re: macro created buttons not working, random numbers not random

    Quote Originally Posted by Logit View Post
    .
    I couldn't get your project to run here ... not certain why, so I couldn't test the following.

    Try adding
    Please Login or Register  to view this content.
    in the refresh Sub.
    Thank you for trying to help.

    Doesn't the "Now()" code refer to the current date and time? How would that help with the random number generator?

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,986

    Re: macro created buttons not working, random numbers not random

    .
    Time is ever changing. The thought is there is just enough of a 'micro second difference' between one point and another that the randomness will be truly random.

    If you plug this macro into Excel (the sheet level module) and run it (command button), you'll see that even though the macro was initiated with a single click of the button,
    all three numbers are different. Truly random because Time is ever changing.

    Hopefully, the difference is enough to change up the card display each time.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-01-2017
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 2013
    Posts
    132

    Re: macro created buttons not working, random numbers not random

    Wow, thats actually a pretty brilliant idea. Thank you.

    I need to still figure out the button issue, but maybe I can figure that out on my own.

    Thank you so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Filtering random numbers without regenerating random numbers
    By ptack in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2022, 04:03 PM
  2. [SOLVED] Random numbers but each number not eqully random.
    By richhhh in forum Excel General
    Replies: 11
    Last Post: 09-06-2016, 01:16 PM
  3. Generating a list of Random numbers of random length...
    By Growl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2013, 12:10 PM
  4. Generating a Random Number of Random Numbers
    By Garrus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2010, 09:39 AM
  5. Working with random numbers
    By Jnels23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2010, 08:17 PM
  6. [SOLVED] Non-random numbers generated by excel's data analysis random gener
    By Allie in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-17-2005, 02:05 AM
  7. [SOLVED] Re: Non-random numbers generated by excel's data analysis random gener
    By Harlan Grove in forum Excel General
    Replies: 2
    Last Post: 09-13-2005, 12:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1