W
Wendy D
Hi. I'm trying to create a userform within/for a template. I've followed
the instructions here:
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm.
Everything seems to have worked right except for step #10. When I create a
new document off the template, I do get the user form. But when I hit the
"CommandButton1" (or if I try and compile while in the "viewcode" of the
command button), I get a COMPILE ERROR: Method or Data Member Not Found.
When I OK the message, it highlights the .Range portion of the code.
I think I have everything the same as instructed, so I'm not sure what's
wrong. Within ViewCode of CommandButton1 (UserForm1) I have:
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("ProjectName").Range_
.InsertBefore TextBox1
.Bookmarks("TaskName").Range_
.InsertBefore TextBox2
End With
UserForm1.Hide
End Sub
Anyone know how to fix me?
Thanks!
Wendy
the instructions here:
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm.
Everything seems to have worked right except for step #10. When I create a
new document off the template, I do get the user form. But when I hit the
"CommandButton1" (or if I try and compile while in the "viewcode" of the
command button), I get a COMPILE ERROR: Method or Data Member Not Found.
When I OK the message, it highlights the .Range portion of the code.
I think I have everything the same as instructed, so I'm not sure what's
wrong. Within ViewCode of CommandButton1 (UserForm1) I have:
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("ProjectName").Range_
.InsertBefore TextBox1
.Bookmarks("TaskName").Range_
.InsertBefore TextBox2
End With
UserForm1.Hide
End Sub
Anyone know how to fix me?
Thanks!
Wendy