AllowMultipleResponses Property

Microsoft FrontPage Visual Basic

AllowMultipleResponses Property

Returns or sets a Boolean that determines whether users can respond more than once to a given survey. If False, a user can only respond once to a survey.

expression.AllowMultipleResponses

expression    Required. An expression that returns a Survey object.

Example

The following example sets the AllowMultipleResponses property of all Survey objects in the active Web site to False so that users can only respond once to a given survey.

    Sub ChangeResponses()

'Sets number of responses to one per user.

    Dim objApp As FrontPage.Application
    Dim objList As Object
    Dim objLists As Lists

    Set objApp = FrontPage.Application
    Set objLists = objApp.ActiveWeb.Lists

    'Cycle through each list and check for list type.
    For Each objList In objLists

        'If it's a Survey then change responses to single.
        If objList.Type = fpListTypeSurvey Then
            objList.AllowMultipleResponses = False
        End If
    Next
End Sub