C
corky_guy
Hey there --
I'm having trouble turning a users selection from a list box into
something else. So, if the user selects MAN then I want the doc to
return 1001 into the document. If the user selects FEM then i want
the doc to return 2002. Here's what I have, but it's not working
right:
Private Sub CommandButton1_Click()
Dim dog As String
Select Case ListBox1.Value
Case 0 = MAN
dog = "1001"
Case 1 = FEM
dog = "2002"
End Select
With ActiveDocument
.Variables("result") = dog
.Fields.Update
End With
Me.hide
End Sub
Private Sub UserForm_Initialize()
With ListBox1
.AddItem " "
.AddItem "MAN"
.AddItem "FEM"
End With
End Sub
Thanks a lot!
I'm having trouble turning a users selection from a list box into
something else. So, if the user selects MAN then I want the doc to
return 1001 into the document. If the user selects FEM then i want
the doc to return 2002. Here's what I have, but it's not working
right:
Private Sub CommandButton1_Click()
Dim dog As String
Select Case ListBox1.Value
Case 0 = MAN
dog = "1001"
Case 1 = FEM
dog = "2002"
End Select
With ActiveDocument
.Variables("result") = dog
.Fields.Update
End With
Me.hide
End Sub
Private Sub UserForm_Initialize()
With ListBox1
.AddItem " "
.AddItem "MAN"
.AddItem "FEM"
End With
End Sub
Thanks a lot!