I have written a document in Word 2K3 and it has some VB code in it.
However when someone in Word XP opens it they code does not work.
Any ideas?
Gerald Ray was telling us:
Gerald Ray nous racontait que :
> I have written a document in Word 2K3 and it has some VB code in it.
>
> However when someone in Word XP opens it they code does not work.
>
> Any ideas?
No.
Security settings?
Other than that, without seeing the code, and since I did not pass my
Crystal Ball class last semester ;-), it is hard to answer...
Can you post the relevant code?

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Gerald Ray - 15 Nov 2004 20:41 GMT
This is a sample of the code
Private Sub CheckBox2_Click()
If (CheckBox2.Value = True) Then
CheckBox3.Value = True
Else
CheckBox3.Value = False
End If
End Sub
All I do is if you click the check box here it will mark a cooresponding
checkbox later on in the document.
> Gerald Ray was telling us:
> Gerald Ray nous racontait que :
[quoted text clipped - 12 lines]
> Crystal Ball class last semester ;-), it is hard to answer...
> Can you post the relevant code?
Jean-Guy Marcil - 15 Nov 2004 21:00 GMT
Gerald Ray was telling us:
Gerald Ray nous racontait que :
> This is a sample of the code
>
[quoted text clipped - 5 lines]
> End If
> End Sub
And how does it fail?
Any error messages? What are they?
If you debug, which line fails?

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Gerald Ray - 15 Nov 2004 21:32 GMT
There are no error messages, the code simply does not appear to execute. In
Word XP but it does in Word 2K3.
> Gerald Ray was telling us:
> Gerald Ray nous racontait que :
[quoted text clipped - 13 lines]
>
> If you debug, which line fails?
Jean-Guy Marcil - 15 Nov 2004 21:47 GMT
Gerald Ray was telling us:
Gerald Ray nous racontait que :
> There are no error messages, the code simply does not appear to
> execute. In Word XP but it does in Word 2K3.
I remember hearing about cases where the ActiveX control changed names when
used across versions in XP.
In design mode, right click on a checkbox control and choose "Code" and see
what names is given to the sub you get to. Is it still CheckBox2? It is
often more reliable to give a name to the control and not let Word defaults
to a standard names for ActiveX controls.
Or, put a Stop command at the top of the code to see if the code gets
executed at all or not.
Personally, I avoid them like the pest!
See what Cindy Meister (Word MVP) has to say about ActiveX controls:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnword2k2/html/
odc_activeX.asp

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org