archimedes
11-15-2006, 02:35 PM
I have a MS Word tempalte file that I have created a UserForm in. The UserForm simply has a text label and text box. I also have a Clear and Register command button.
My text label: Registration Code
My text box is: txt_regcode
My Clear btn is: cmd_clear
My Register btn is: cmd_register
UserForm name: UserForm1
Registration Code: "1234"
I simply want to display the UserForm (UserForm1) when I open the MS Word document Template and require my fellow workers to enter a valid "registration code" that I will hard code in the VBA code before they can use the Template to create a document.
They will do this by entering the proper code "1234" in the txt_regcode field and then selecting the "Register" command button. If they successfully enter 1234 into the text box, I will close UserForm1 and then allow them to beging their new document based on my template. If they do not properly enter "1234" then I will display a message box asking them to try again. If they select the Cancel cmd button, it will close the UserForm and quit MS Word.
I have some limited VBA experience, I just need a pointer in the right direction on some of the syntax.
Thank you in advance.
My text label: Registration Code
My text box is: txt_regcode
My Clear btn is: cmd_clear
My Register btn is: cmd_register
UserForm name: UserForm1
Registration Code: "1234"
I simply want to display the UserForm (UserForm1) when I open the MS Word document Template and require my fellow workers to enter a valid "registration code" that I will hard code in the VBA code before they can use the Template to create a document.
They will do this by entering the proper code "1234" in the txt_regcode field and then selecting the "Register" command button. If they successfully enter 1234 into the text box, I will close UserForm1 and then allow them to beging their new document based on my template. If they do not properly enter "1234" then I will display a message box asking them to try again. If they select the Cancel cmd button, it will close the UserForm and quit MS Word.
I have some limited VBA experience, I just need a pointer in the right direction on some of the syntax.
Thank you in advance.