Adding VB ActiveX Controls - Checklist Survey in Microsoft Word 2010 (part 5 of 9)
This video shows how to Add all the ActiveX Controls Checkboxes CommandButton and Labels for Microsoft Word 2010. Word Document is built using Visual Basic Editor and is saved as a Macro Enabled Document (.docm). VBA ActiveX Controls Used: Checkbox, Label, Commandbutton. Survey has checkbox options for a customer satisfaction survey checklist. Commandbutton allows user to clear the survey and all data is auto-calculated. (part 1 of 9)
Closed Caption:
hello everyone in this next portion of
the video is we're going to get our
things going a little bit more exciting
little more challenging and i'm going to
show you how we are going to add the
checkboxes to this survey now please
follow along very carefully because it's
very important that you get this right
without setting this setting this up
correctly your programming code will not
work once you start entering in the code
to make the survey work
oh I don't have your developers tap
selected you're going to look for the
icon that's that has this like a hammer
and a wrench on it that says you're
going to be your activex controls a
little balloon should pop it says insert
an activex control or form control and
you're going to select that and there's
two check boxes that are here you have
one centered legacy forums and you have
one Center activex controls it's very
important that you select the checkbox
that's under activex control school and
select that by selecting it it's gonna
throw the check box wherever your cursor
is on the userform i'm on the actual
word document so in this case my cursor
was right after the ? so that's worth it
through the checkbox notice how i'm
going to press the Enter key the return
and I said move my child box down i'm
going to leave that to that's there
so now we have checkbox one so now
you're going to go on and click it with
your left button mouse right click it
and select properties
don't be overwhelmed with all this data
were the only ones that we're really
going to pay attention to is the caption
and the name of the other box so the
caption I'm gonna change that too a1 and
i'm just going to decrease the width
so now we have one now there's another
now I'm going to show you there's two
ways that we can add the number to you
can either go go the same path were you
go to your activex controls and select
again and i'm just going to change the
caption this time to a2 and I'm gonna
decrease the width again now before i
show you how to do the next method on
how to cook how to add another check box
here's what i want to show you i'm going
to select number one knows we change the
caption 21 the name of this control this
this checkbox is called checkbox one
that's the the name that the computers
given the this activex control and the
next one is checkbox to I'm we're going
to go on and change these names to make
the programming easier but i'm not going
to get into that just yet i'm going to
show you how to add another another
checkbox i'm gonna click the 2 i'm going
to hold down ctrl and press C just doing
a control copy and then over here i'm
just going to control V to paste and
let's be as in Victor and I'm going to
do it again ctrl V and then control me
that way have a total of five and what
I'm going to do is I'm going to change
the caption on each one respectively
this 1 2 3 i'm going to select the next
one and put it as a four and then i'm
going to go to the last one and selected
as a five and all I did was change the
caption i have it changed the name of
the checkboxes and as you know it's like
this third the third checkbox
accidentally double clicked it but this
third checkbox is checked box 21 the
reason why the computer game with that
name is because we copy control checkbox
to and all it did was it added a 12 the
end and at the same thing for the the
fourth one
it had exited since to dash one was
taken and put it to a 22 and so this
next one will be a 23 but anyhow we're
going to rename that just to make it
easier on our programming as we get into
the coding you'll see how it's going to
be easier when
we rename these checkboxes but for
formatting purposes first i'm gonna i'm
going to my put five spaces in between
each activex control so I'm just moving
my moving the cursor or the point i
should say in between the activex
controls using my my arrows so 125
spaces so that way we it's nice and
aligned and this is what I'm going to do
I'm going to change the name on the
first one to where it's question one and
i'm just going to say i'm going to
consider this as being option A for the
second one I'm going to put it still
question 1
what's option B for the third 1 question
1 and this is going to be option C for
number four where again it's still
question one but this is option D and
the number-5 question one option II
this way they all have their own name
that's you can you can say it's a
respective to question number one we
have a b c d and e we're going to repeat
this process for number two and number
three this time I'm going to speed it up
on adding it so just watch how I do it
I'm gonna go on to just highlight it
copy it and i'm going to paste them here
and I'm gonna do the same thing for
number three just going to paste them
again
now what I'm going to have to do very
quickly is change change the names this
is going to be questioned to a this is
going to be questioned to be select
number three this is going to be
questioned 3c and then we noticed i made
a mistake i meant to say this is
question to see and that would be a very
critical mistake because then we the
coding would get messed up so make sure
that when your name of these controls
that your name of them write this
question to a question to be questioned
to see this was going to be questioned
2d and question 2 e
go ahead and repeat the process on your
own for the third one and you're going
to follow the same process is going to
be question 3 a question 3 be
question 3 C and then DNE now under
surface statistics we're going to add
two more activex controls the first one
is going to be a label so go to your
activex controls but again select that
and I'm sorry before proceeding make
sure that again you put your cursor and
the pointers to where you're where you
want to label to be in this case have a
setup right here i'm going to go on and
select activex controls and i'm going to
the one that has a letter A which is a
label i'm going to click it and I just
see it says label1 and almonds change
the caption on it i'm going to put avg
for average but zero put a dash hyphen
and i'm still put 50 is with the spacing
between each each 0 when we do the
coding we're actually going to change
change this label using code so it you
really don't have to make it perfect
that will be done in the end the coding
now after the label going to do a few
spaces and i'll go back to your activex
controls under activex controls you're
going to go on and select this option
right here this button it's a command
button icon and select it and it says
command but in one we're just going to
change that caption to clear survey if
for any reason this property windows
does not come up all you do is you click
the back to vex control right click it
and go to properties
alright so that completes this portion
of the video again before you proceed to
the next video which is the video we're
going to add the coding make sure that
you have the name your checkboxes
appropriately this should be a q1 a q1 b
qn c and $OPERAND respectively all the
way t2e do the same thing for question 2
and question three very important that
you look at your properties to make sure
that their name properly so i haven't
done question 3 yet so after this video
i'm going to change this out but make
sure on yours you complete this but this
should be questioned 3a q3 a q3 be cute
3 c q 34 + q 35
Video Length: 09:40
Uploaded By: Alex Cantu
View Count: 24,302