![]() |
|
#6
|
||||
|
||||
|
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] |
| Tags |
| date, format, userform |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Checkbox in Userform
|
lukael | Excel Programming | 5 | 02-18-2014 05:20 AM |
| Userform Code not quite right - help please | vbanovice | Word VBA | 1 | 09-29-2013 09:20 PM |
Help with a drop down in userform and variables
|
leemoreau | Word VBA | 1 | 09-14-2013 06:01 AM |
| VBA code to update record in Access 2003 using Userform in Excel | primmer3001 | Excel Programming | 0 | 08-29-2011 04:25 PM |
Update bookmarks and variables in document
|
webharvest | Word VBA | 5 | 06-21-2011 03:22 PM |