![]() |
#11
|
||||
|
||||
![]()
.SetFocus does indeed put the cursor on the named box.
You don't need the space in the combo-box entries. If you need a space after the value when it is transferred to the document, add the space there as in my example- Chr(32) is a space or you could use " ". Putting a value in a table is simple enough, provided you don't have merged cells in the table e.g. Code:
Dim oTable As Table Dim oCell As Range Set oTable = ActiveDocument.Tables(1) ' the first table in the document Set oCell = oTable.Cell(1, 1).Range 'the first cell in the first row of the table oCell.End = oCell.End - 1 'remove the cell end character from the range oCell.Text = "The value you want to add to the cell"
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
vba combobox |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
VBA-User | Excel Programming | 4 | 01-07-2016 02:46 AM |
Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge | Berryblue | Mail Merge | 1 | 11-13-2014 05:36 PM |
![]() |
Deepa Shrestha | Word VBA | 1 | 09-29-2013 09:30 PM |
![]() |
ll4u76 | Word VBA | 1 | 04-13-2012 03:37 AM |
![]() |
Billy_McSkintos | Word VBA | 1 | 09-13-2011 05:50 AM |