Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MAcro help please
I need a script that will run that when a field = a certain answer it will
make the next field a mandatory field to fill in. Help please. -- Thanks,, Kim |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MAcro help please
"Kim K" wrote:
I need a script that will run that when a field = a certain answer it will make the next field a mandatory field to fill in. Help please. I think that more information is needed in order to offer help... Word version? What is the type of the initial field? What is the type of this next field? Are you writing about a protected form (form fields) or a userform (control fields)? Who will be using the document? Is this a template *.dot or a *.doc? Some content examples would be nice... And, just to let you know, macro questions should be posted in the Programming group (microsoft.public.word.vba.general). |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MAcro help please
sorry, was in a hurry:
Word version 03 adn 07 (both will be used in working on the fianl form) THe initial field is a drop down box with 5 choices, the next field will be a text field to input information if choice 2 or 3 is selected in teh drop down box. The forms will be protected when finished Staff from 7 different school corp's will be using the forms in a *.dot format. and lastly sorry bout posting here........... -- Thanks,, Kim "Jean-Guy Marcil" wrote: "Kim K" wrote: I need a script that will run that when a field = a certain answer it will make the next field a mandatory field to fill in. Help please. I think that more information is needed in order to offer help... Word version? What is the type of the initial field? What is the type of this next field? Are you writing about a protected form (form fields) or a userform (control fields)? Who will be using the document? Is this a template *.dot or a *.doc? Some content examples would be nice... And, just to let you know, macro questions should be posted in the Programming group (microsoft.public.word.vba.general). |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MAcro help please
"Kim K" wrote:
sorry, was in a hurry: Word version 03 adn 07 (both will be used in working on the fianl form) THe initial field is a drop down box with 5 choices, the next field will be a text field to input information if choice 2 or 3 is selected in teh drop down box. The forms will be protected when finished Staff from 7 different school corp's will be using the forms in a *.dot format. and lastly sorry bout posting here........... With protected form, the only way to enforce the filling out of some fields, is to have code run before the form is closed/saved/printed. This is advanced VBA that is beyond the scope of a simple post in these groups. If you can use a userfom instead, the code would be much easier, but still, not beginner stuff! In case you want to use a userform, see here for more info on how to build them. If you try, post back in the Programming group (or userfrom group if you have access): http://word.mvps.org/faqs/Userforms/index.htm Or, if you can live with just a reminder popping up, you can have a message displayed when a particular choice is selected in the dropdown, but you could not enforce the fact... |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MAcro help please
I can deal wiht the rminder, any help on hits you can offer wil help me meet
my deadline of the rest of my forms! -- Thanks,, Kim "Jean-Guy Marcil" wrote: "Kim K" wrote: sorry, was in a hurry: Word version 03 adn 07 (both will be used in working on the fianl form) THe initial field is a drop down box with 5 choices, the next field will be a text field to input information if choice 2 or 3 is selected in teh drop down box. The forms will be protected when finished Staff from 7 different school corp's will be using the forms in a *.dot format. and lastly sorry bout posting here........... With protected form, the only way to enforce the filling out of some fields, is to have code run before the form is closed/saved/printed. This is advanced VBA that is beyond the scope of a simple post in these groups. If you can use a userfom instead, the code would be much easier, but still, not beginner stuff! In case you want to use a userform, see here for more info on how to build them. If you try, post back in the Programming group (or userfrom group if you have access): http://word.mvps.org/faqs/Userforms/index.htm Or, if you can live with just a reminder popping up, you can have a message displayed when a particular choice is selected in the dropdown, but you could not enforce the fact... |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MAcro help please
"Kim K" wrote:
I can deal wiht the rminder, any help on hits you can offer wil help me meet my deadline of the rest of my forms! Place this Sub in the ThisDocument module. Then, in the dropdown porperty dialog box (double-click on it in editing mode - before applying the protection), associate the "Run macro on Exit" with he following macro: Sub MessageDrop() 'Name of field that must be filled, _ Change the text between the quotes. Const strFieldName As String = "ImportantInformation" With Selection.FormFields(1).DropDown Select Case .Value 'Code works with second and third item in drop down Case 2, 3 MsgBox "You must complete the """ & strFieldName & """ field.", _ vbExclamation, "Important!" End Select End With End Sub |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MAcro help please
Thank you Jean-guy, would this work similarily with a simple pop up box at my
last textfield of drop dpwn to say something like, please be sure infomraitno is complete before saving, not a blank field macro as some fields will remain blank due to student demographic info, but just a reminder to check work before saving. -- Thanks,, Kim "Jean-Guy Marcil" wrote: "Kim K" wrote: I can deal wiht the rminder, any help on hits you can offer wil help me meet my deadline of the rest of my forms! Place this Sub in the ThisDocument module. Then, in the dropdown porperty dialog box (double-click on it in editing mode - before applying the protection), associate the "Run macro on Exit" with he following macro: Sub MessageDrop() 'Name of field that must be filled, _ Change the text between the quotes. Const strFieldName As String = "ImportantInformation" With Selection.FormFields(1).DropDown Select Case .Value 'Code works with second and third item in drop down Case 2, 3 MsgBox "You must complete the """ & strFieldName & """ field.", _ vbExclamation, "Important!" End Select End With End Sub |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MAcro help please
"Kim K" wrote:
Thank you Jean-guy, would this work similarily with a simple pop up box at my last textfield of drop dpwn to say something like, please be sure infomraitno is complete before saving, not a blank field macro as some fields will remain blank due to student demographic info, but just a reminder to check work before saving. Of course, you can use this on all or just some of the dropdowns. Just modify the Case Select to have it react to the values in the dropdown you want. For now, because it is easier, just use as many different macros (each with a unique name) as you have dropdowns. You can remove the Select case if you want it to display a message regardless of the values in the dropdown. As for some sort of message in the last drpdown, the only problem is that you cannot guarantee that all users will click into, much less click out of, the last dropdown field. I, however, can guarantee that some users will not use/click into that last dropdown! ;-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Spell Check a protected Form with a Macro & already have forms picture macro | Microsoft Word Help | |||
Macro cannot be found or has been disabled because of Macro settin | Microsoft Word Help | |||
Pause an executing Word Macro to enter info and then Macro continu | Microsoft Word Help | |||
macro runs from keyboard, but not from macro button-why? | Microsoft Word Help | |||
2000 to 2002 macro and "Could not open macro storage" | Mailmerge |