Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Template disappears
I created a userform for my template but when I fill it out and hit ok the
whole template disappears and Word sends me into a new document. Why does this happen and how can I fix it? Thanks, Jill |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Template disappears
On Tue, 15 Nov 2005 15:12:02 -0800, Jill D
wrote: I created a userform for my template but when I fill it out and hit ok the whole template disappears and Word sends me into a new document. Why does this happen and how can I fix it? Thanks, Jill Remember my answer in your other thread, that there's no way to tell without seeing the code? Well.... ditto. We need to know what you told Word you wanted it to do. Post back and include both the code of the macro that displays the userform, and the code in the userform itself. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Template disappears
I would cut and paste it but it won't let me into the template so here goes,
if I have to fix the code, how would I get back into the template, if it won't let me?: This is for the Userform: Private Sub Document_New() Dim oForm As frmDismissal On Error Goto Error_DocumentNew Set oForm = New frmDismissal oForm.Tag = "Cancel" oForm.txtDate.Text = Format$(Date, "mm/dd/yyyy") oForm.Show If oForm.Tag = "OK" Then ActiveDocument.Bookmarks("ClientName").Range.Text = oForm.txtClientName.Text ActiveDocument.Bookmarks("PetName").Range.Text = oForm.txtPetName.Text ActiveDocument.Bookmarks("Doctor").Range.Text = oForm.txtDoctor.Text ActiveDocument.Bookmarks("Date").Range.Text = oForm.txtDate.Text Unload oForm Set oForm = Nothing Else Unload oForm Set oForm = Nothing ActiveDocument.Close wdDoNotSaveChanges End If Exit_DocumentNew: Exit Sub Error_DocumentNew: On Error Resume Next Unload oForm Set oForm = Nothing ActiveDocument.Close wdDoNotSaveChanges Resume Exit_DocumentNew End Sub Here's the next one (for the cancel button): Option Explicit Private Sub cmdCancel_Click() Me.Hide End Sub Here's the ok button: Private Sub cmdOK_Click() Me.Tag = "OK" Me.Hide End Sub Thanks for all your help!!! Jill I created a userform for my template but when I fill it out and hit ok the whole template disappears and Word sends me into a new document. Why does this happen and how can I fix it? Thanks, Jill Remember my answer in your other thread, that there's no way to tell without seeing the code? Well.... ditto. We need to know what you told Word you wanted it to do. Post back and include both the code of the macro that displays the userform, and the code in the userform itself. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Template disappears
In addition, you might want to be aware that there is a separate NG devoted
entirely to UserForms: news://msnews.microsoft.com/microsof....vba.userforms or http://www.microsoft.com/communities...ba.userform s -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Jay Freedman" wrote in message ... On Tue, 15 Nov 2005 15:12:02 -0800, Jill D wrote: I created a userform for my template but when I fill it out and hit ok the whole template disappears and Word sends me into a new document. Why does this happen and how can I fix it? Thanks, Jill Remember my answer in your other thread, that there's no way to tell without seeing the code? Well.... ditto. We need to know what you told Word you wanted it to do. Post back and include both the code of the macro that displays the userform, and the code in the userform itself. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
template disappears | Microsoft Word Help | |||
Global/Master Template | New Users | |||
MS Word should support inheritence with regard to templates | Microsoft Word Help | |||
CPU Usage When Working with Templates you created | Microsoft Word Help | |||
Bring custom toolbars with templates | Page Layout |