Question 1.
Something like this:
Sub ScratchMacro() Dim oILS As InlineShape Dim oCtr As Object For Each oILS In ActiveDocument.Range.InlineShapes If oILS.Type = wdInlineShapeOLEControlObject Then If InStr(oILS.OLEFormat.Object.Name, "ComboBox") > 0 Then Set oCtr = oILS.OLEFormat.Object With oCtr .Clear .AddItem "1" .AddItem "2" .AddItem "3" End With End If End If Next oILS End Sub
Lee Kiwiflame wrote:
[Quoted Text] > I have a table which has an Employees Rating and a Managers Rating in > separate cells, in each row. The rating is selected by a combo box. > There are 15 rows (therefore 30 combo boxes). > > I am wanting to add the same items to each combo box. I know how to > add the items to individual combo boxes, e.g. > > With ActiveDocument.ComboBox1 > .AddItems "1" > .AddItems "2" > .AddItems "3" > End With > > I don't want to have to add the above code for each Combo Box. Is > there a way to do this? > > I am also wanting to get the value of each combo box and then shade > cells with a colour depending on the value of each combo box. (e.g. > if an employee selects 3 as a rating, the next 3 cells (next to the > cell holding the combo box) will be shaded red. > > I'm wanting a form that is more "visual" than lists, combo boxes etc. > I don't want the form to look like people are filling out a > questionaire. > > Regards > Lee
-- Greg Maxey - Word MVP
My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org
|