Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Activex Control in Word Document
I am using an activex control (combobox) in a macro that exists within my
word document. I have attached my code below. The problem is that even when the combobox selection is NOT equal to CLAY, the macro still executes the code as if the combobox selection was CLAY. Prehaps the "if result =" method is not valid here? Appreciate any help you can offer. Sub test() Dim CB26 As Object Set CB26 = ActiveDocument.ComboBox26 With CB26 If Result = CLAY Then Selection.GoTo What:=wdGoToBookmark, Name:="Sample1" Selection.MoveRight unit:=wdCharacter, Count:=1, Extend:=wdExtend Selection.Copy Selection.GoTo What:=wdGoToBookmark, Name:="Result1" Selection.Paste Else Selection.GoTo What:=wdGoToBookmark, Name:="Sample11" Selection.MoveRight unit:=wdCharacter, Count:=1, Extend:=wdExtend Selection.Copy Selection.GoTo What:=wdGoToBookmark, Name:="Result1" Selection.Paste End If End With End Sub |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I enable ActiveX control for discussion groups | New Users | |||
How do I automatically activate ActiveX control? | Microsoft Word Help | |||
ActiveX Control for Word Demos | Microsoft Word Help | |||
Is there a Microsoft Word ActiveX Control for the Web? | Microsoft Word Help | |||
Mysterious ActiveX control in world document. | Microsoft Word Help |