Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Sep 2004
    Location
    Sydney, New South Wales, Australia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Referring to Drop Down Form Fields (1)

    I am new to working with VB in Word.
    I am designing a form which has a Drop Down Form Field and wish to be able to have certain other Text Form Fields and Check Box Form Fields enabled or disabled depending on the choice made in the Drop Down Form Field. I plan to run a 'Macro on exit' from the Drop Down Form Field.

    There is one of two choices and I thought a simple if statement would work such as:

    If ActiveDocument.Bookmarks("Schedule") = "12 Month" Then
    some action
    Else
    some other action
    End If

    However the If statement does not recognise the string in the Drop Down Form Field.
    How should I go about this?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Referring to Drop Down Form Fields (1)

    I'm away from the computer, so can't check the exact syntax... try using the FormFields collection and the Result property.

  3. #3
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referring to Drop Down Form Fields (1)

    You should use
    If ActiveDocument.FormFields("Schedule").Result = "12 Month" Then

  4. #4
    Star Lounger
    Join Date
    Sep 2004
    Location
    Sydney, New South Wales, Australia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referring to Drop Down Form Fields (1)

    Thanks for the reply my form is now working a treat.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •