View Single Post
 
Old 04-30-2014, 04:11 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could use code like the following to populate a 'StrOut' variable, which is then used to update the document's bookmark (for which I've already provided demo code):
Code:
Private Sub cmdOK_Click()
Application.ScreenUpdating = False
Dim StrOut As String
Select Case cboName.Value
  Case "Bob": StrOut = "1"
  Case "Cindy": StrOut = "2"
  Case "Peter": StrOut = "3"
  Case "Vanessa": StrOut = "4"
End Select
'update code goes here
Application.ScreenUpdating = True
Unload Me
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote