command buttons


  1. Posts : 1
    windows 7
       #1

    command buttons


    hi everyone,
    i'm looking for a little bit of help please, here is what i want to do:
    i want a button on a word document that when clicked upon generates a random number between 1 and 6 and displays it. when clicked again, a different number is generated to replace the old one. i'd like the button in the document so that i can take it to different machines. the document in question is an adventure sheet for 'choose your own adventure' style books, and the random number is a dice roll.

    i've tried googling and so forth, but unfortunately it appears that i have no knowledge at all in this area and the existing tutorials on command buttons or macros seem difficult to implement. if someone knows how to do this i'd be really grateful for a plain english explanation. i'm fairly quick with concepts and computers, so i'm pretty sure i won;t be asking for a million clarifications !

    many thanks,

    tawraste :)
      My Computer


  2. Posts : 872
    Windows 7 Home Premium x64
       #2

    Welcome to the Seven Forums! :)

    You're going to need to make a macro using Visual Basic for Applications. Don't worry, it's built into Word (assuming you have Word 2000 or newer). Fortunately, I have some experience with Visual Basic (as do some others around here). If you can tell me how you want the button to display the number (in a message box, somewhere on the page, etc), and what the label on the button should be, I should be able to tell you exactly what you need to do.

    Also please let me know which version of Word you are using.
    Last edited by BCXtreme; 18 Jun 2010 at 11:10. Reason: Need more info, again
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:50.
Find Us