check box

D

Designingsally

is it possible to create a set of check box and then letting the user select
options from the check box . On selecting the required options, can
corresponding macros made be run?

Like first it somethin like this come:
Pls select the followings
find and rumber
colons
tough words

so if hte user clicks find and replace and tough words. then macros must run
find and replace and tough words macors.( for which i got the code)

but can this function be achieved thru macros
 
R

Rich007

Sally,
Try working through this example of how to create a UserForm in VBA.
http://word.mvps.org/FAQS/Userforms/CreateAUserForm.htm

When you've done that, try inserting a CheckBox instead of the TextBox at
Step5 of the example.

You would want to end up with a userform with your CheckBoxes (one for each
option) and an CommandButton which could have OK as the caption (one with
Cancel on is also a good idea so the user can cancel running the macro).

When your user hits OK the code in Private Sub CommandButton1_Click() will
run (view it by right-clicking on the CommandButton and choose View Code).

In this macro is where you would test the settings (values) of the
checkboxes, for example:
If CheckBox1.Value = True then DoWhatCheckBox1Says = True

or, call your individual subs after the Then.

You would have the user display the UserForm by them running a macro with
UserForm1.Show

Hope that's enough to get you started.
Cheers
Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top