macros

  • Thread starter Thread starter arthur miller
  • Start date Start date
A

arthur miller

hello, i am creating an powerpoint presentation and i need
to know how to create a macro so that a p[erson who is
viewing the presentation will be able to type into a box.
and providing they type the wrong thing it gives an error
message.

any help?
 
A couple of ways to accomplish "verification". Here are some samples I have
used in the past:

1. Ensuring no blanks: Assume you have a textbox called "txtFirstName". To
make sure it isn't blank, add this (and other IF statements) to a click
button:

If Me.txtFirstName.Text = "" Then
MsgBox ("You must enter a first name for credit! Try Again.")
Me.txtFirstName.SetFocus
Else

2. To ensure it is exactly certain text. Here assumes a textbox called
"txtpassword" has the text "testing" in the box:

If Me.txtPassword.Text = "testing" Then
do something here
Else
' If (MsgBox("You have entered the wrong password. Do you want to try
again?", vbYesNo, "Wrong password") = vbYes) Then
MsgBox "You have entered the wrong password. Try again, or after
clicking OK, press the EC key to exit.", vbOKOnly, "Try again"
Me.txtPassword.Text = ""
Me.txtPassword.SetFocus
End If

Hope this helps!
 
Back
Top