command buttons

tawraste

New member
Local time
11:10 AM
Messages
1
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

OS
windows 7
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:

My Computer

Computer Manufacturer/Model Number
Alienware X51
OS
Windows 7 Home Premium x64
CPU
Intel Core i7-2600 @3.40GHz
Memory
8.00GB DDR3
Graphics Card(s)
NVIDIA GeForce GTX 555 w/1.0GB RAM
Monitor(s) Displays
BenQ XL2420TX
Screen Resolution
1920x1080@120Hz
Hard Drives
1TB
PSU
330-watt
Keyboard
Logitech Wireless Illuminated Keyboard K800
Mouse
Razer Orochi
Internet Speed
Campus Internet
Back
Top