![]() |
#1
|
|||
|
|||
![]() I have MACROBUTTON, that launches UserForm, that contains ComboBox. What is the code to export chosen value from ComboBox to document as text. I have this code: Code:
Private Sub UserForm_Initialize() With cboFood .AddItem "Apple" .AddItem "Pie" .AddItem "Meat" .AddItem "Squirrel" .AddItem "Banana" .AddItem "Nuts" End With End Sub ____________________________________ Private Sub cmdOK_Click() With ActiveDocument .Bookmarks("Food).Range.Text = cboFood.Value End With Application.ScreenUpdating = True Unload Me End Sub I think the code that I am looking for is something like this: Code:
Private Sub cmdOK_Click() Selection.TypeText Text:="cboFood.Value" Unload Me End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Textbox updating from combobox selection | paxile2k | Word VBA | 0 | 10-26-2010 02:30 PM |
How to use the content of a combobox for {IF} field? | Melaanie | Word | 0 | 06-14-2010 02:00 AM |
![]() |
Vivi | Word VBA | 1 | 01-27-2010 07:03 AM |
![]() |
vsempoux | Word VBA | 3 | 10-31-2009 08:58 AM |
Export/Import | Arkmom | Outlook | 0 | 03-31-2009 02:47 PM |