Quote:
Originally Posted by alshcover
The document has a bookmark titled "Name". The value for cboName is inserted at this bookmark.
The document has another bookmark titled "ID". I would like the StrOut variable for its associated cboName value to be inserted at this bookmark.
With your help, I've put together the code below. Is this the correct use of the StrOut variables and the Call UpdateBookmark?
|
You're still not updating the "Name" bookmark for 'cboName.Value' properly:
Code:
Private Sub cmdOK_Click()
Application.ScreenUpdating = False
Dim StrOut As String
StrOut = cboName.Value
Call UpdateBookmark("Name", StrOut)
Select Case cboName.Value
Case "Bob": StrOut = "1"
Case "Cindy": StrOut = "2"
Case "Peter": StrOut = "3"
Case "Vanessa": StrOut = "4"
End Select
Call UpdateBookmark("ID", StrOut)
Application.ScreenUpdating = True
End Sub