'Functions.vbs 'demonstrates the use of functions 'Scripting by Fusion 13 'webmaster@Fusion13.com Please send attachments and personal programs and or scripts 'computing.Fusion13.com '7-22-01 'Copyright Fusion 13 Option Explicit 'Global Variables dim xbox dim fName dim lName call fNameFunction call lNameFunction(lname) 'line 12 xbox = msgbox("Your last name is " + lname + ".", vbokonly, "Last Name") call fullNameFunction '************************* 'use of Global Variables in a Function Function fNameFunction() fName = inputbox("Please enter your First Name." , "First Name") xbox = msgbox("Your First Name is " + fName + ".", vbokonly, "First Name") End Function '************************ 'use of NO Global Variables in a Function Function lNameFunction(lastname) lastname = inputbox("Please enter your Last Name." , "Last Name") End Function '************************** 'Function to Display Full Name Function fullNameFunction xbox = msgbox("Your Full Name is " + fname + " " + lname + ".") End Function