This is just a test I was fooling around with. It has to be a property of the
file or something. I can't figure out how to get this sub to run once the
file is open. Any Suggestions????

Code:
Sub nameTest()
Dim fName As String
Dim lName As String
Dim fullName As String
Dim strMsg1 As String

fName = InputBox("What is your first name?", "First Name")
lName = InputBox("What is your last name?", "Last Name")
fullName = MsgBox("Is this your full name?: " & fName & " " & lName,
vbYesNo, "Full Name")

Do While fullName <> vbYes
fName = InputBox("What is your first name?", "First Name")
lName = InputBox("What is your last name?", "Last Name")
fullName = MsgBox("Is this your full name?: " & fName & " " &
lName, vbYesNo, "Full Name")
Loop

strMsg1 = MsgBox("Thanks for your confirmation!", vbOKOnly, "Thanks!!")
End Sub


--
"True warrior triumph in battle within the mind before striking their
enemies on the battle field."

-Azone

Re: Loading/running modules with Word 2003 by Doug

Doug
Wed Mar 15 13:24:06 CST 2006

If you want it to run when an existing file is opened, then it needs to be
called Autoopen(). If you want it to run when a new file is created, it
needs to be called Autonew()

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Azone" <Azone@discussions.microsoft.com> wrote in message
news:F419B2B7-32E5-4DA3-A3D5-943DE25739EB@microsoft.com...
> This is just a test I was fooling around with. It has to be a property of
> the
> file or something. I can't figure out how to get this sub to run once the
> file is open. Any Suggestions????
>
> Code:
> Sub nameTest()
> Dim fName As String
> Dim lName As String
> Dim fullName As String
> Dim strMsg1 As String
>
> fName = InputBox("What is your first name?", "First Name")
> lName = InputBox("What is your last name?", "Last Name")
> fullName = MsgBox("Is this your full name?: " & fName & " " & lName,
> vbYesNo, "Full Name")
>
> Do While fullName <> vbYes
> fName = InputBox("What is your first name?", "First Name")
> lName = InputBox("What is your last name?", "Last Name")
> fullName = MsgBox("Is this your full name?: " & fName & " " &
> lName, vbYesNo, "Full Name")
> Loop
>
> strMsg1 = MsgBox("Thanks for your confirmation!", vbOKOnly, "Thanks!!")
> End Sub
>
>
> --
> "True warrior triumph in battle within the mind before striking their
> enemies on the battle field."
>
> -Azone