Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
owen owen is offline
external usenet poster
 
Posts: 61
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enable ActiveX control for discussion groups alabue1973 New Users 3 June 2nd 08 04:24 AM
How do I automatically activate ActiveX control? Ruth Microsoft Word Help 1 July 11th 06 11:55 AM
ActiveX Control for Word Demos Penny Microsoft Word Help 0 October 20th 05 10:59 PM
Is there a Microsoft Word ActiveX Control for the Web? Patrick Niland Microsoft Word Help 0 October 3rd 05 11:29 AM
Mysterious ActiveX control in world document. Walter R. Microsoft Word Help 0 March 6th 05 05:43 PM


All times are GMT +1. The time now is 06:26 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"