Ok, please refer to the following:
Macro 1(Allowances Macro):
---------
Sub Allowances() 'fills text field based on content of _dropdown field
Dim oFld As FormFields
Set oFld = ActiveDocument.FormFields
Select Case oFld("Country_Name").Result
Case Is = "AUSTRALIA"
oFld("Allowance1").Result = "Car Allowance (IT14-6T01)"
oFld("Allowance2").Result = "Notional Salary Percentage (IT14-4T19)"
'IT185
oFld("ID1").Result = "185-04 Work Permit"
oFld("ID2").Result = "185-10 Passport"
oFld("ID3").Result = "185-45 UID/MIN number- US Benefits ID"
oFld("ID4").Result = "185-50 USA Social Security Number"
Case Else
'Do nothing
End Select
End Sub
Macro 2: Personnel Area Macro:
---------------------------------------
Sub PersonnelAreaMacro()
PersonnelArea.Show
End Sub
User Form (Personnel Area):
-------------
Private Sub UserForm_Initialize()
Dim myArray1() As String 'AUSTRALIA
myArray1 = Split("ADE2(AU02-Adelaide) AUC1(NZ01-Auckland)
BRI2(AU02-Brisbane) CAN2(AU02-Canberra) MEL2(AU02-Melbourne)
MEL3(AU03-Melbourne) PER2(AU02-Perth) SYD2(AU02-Sydney) SYD3(AU03-Sydney)
WEL0(NZ01-Welington)")
Me.PersonnelArea.Clear
Select Case ActiveDocument.FormFields("Country_Name").Result
Case "AUSTRALIA"
Me.PersonnelArea.List = myArray1
End Select
End Sub
Private Sub OK_Click()
ActiveDocument.FormFields("PersonnelArea").Result = Me.PersonnelArea.Text
ActiveDocument.Bookmarks("PersonnelArea").Range.Fields(1).Result.Select
Unload Me
End Sub
Private Sub Reset_Click()
ActiveDocument.FormFields("PersonnelArea").Result = " "
ActiveDocument.Bookmarks("PersonnelArea").Range.Fields(1).Result.Select
Unload Me
End Sub
-----------------------------------
Basically, above are just 2 of the user form and macro that I'm having in
the form now. The Allowances macro was run as the "entry macro" of the
Country_Name field. While the Personnel Area Macro was run as the "entry
macro" when I click on the "Personnel Area" field
I did not get the error when after I save and open the document for several
times. However, the user is getting the error message and the personnel area
that they have entered went missing after they get the error message.
"Doug Robbins - Word MVP" wrote:
> You need to show us the code that you are using.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "ah"
> news:ACA36F37-7D2B-4EF4-A9C8-2707DC0185DC@microsoft.com...
> > Hi;
> >
> > Can anyone help me with the following:
> >
> > I've created a form with some built in macro which allow the user to get
> > different selection list when they select different country. It works well
> > at
> > my end. However, when the user fills in and save the form, they will get a
> > prompted message as follows when they open the form later:
> >
> > Error message:
> > Do you want to merge cahnges in "alice-01Mar 2008.doc" back into
> > D:\Profiles\Alice\Desktop\New Hires-IDL\Alice-01Mar 2008.doc"?
> >
> > There are 3 selections available after the user got the above prompted
> > message (Yes, No or No and don't ask again)
> >
> > Some of the data that they have filled and saved previously will be
> > missing
> > after they get the above message.
> >
> > Appreciate if someone could help on this urgently.
> > Thanks in advance.
>
>
>