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?

Re: Word by Jean-Guy

Jean-Guy
Mon Nov 15 14:37:46 CST 2004

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?

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




Re: Word by Gerald

Gerald
Mon Nov 15 14:41:50 CST 2004

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.

"Jean-Guy Marcil" <no-spam@leaveme.alone> wrote in message
news:Ow$7yL1yEHA.908@TK2MSFTNGP11.phx.gbl...
> 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?
>
> --
> Salut!
> _______________________________________
> Jean-Guy Marcil - Word MVP
> jmarcilREMOVE@CAPSsympatico.caTHISTOO
> Word MVP site: http://www.word.mvps.org
>
>
>



Re: Word by Jean-Guy

Jean-Guy
Mon Nov 15 15:00:01 CST 2004

Gerald Ray was telling us:
Gerald Ray nous racontait que :

> 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
>

And how does it fail?
Any error messages? What are they?

If you debug, which line fails?

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




Re: Word by Gerald

Gerald
Mon Nov 15 15:32:09 CST 2004

There are no error messages, the code simply does not appear to execute. In
Word XP but it does in Word 2K3.

"Jean-Guy Marcil" <no-spam@leaveme.alone> wrote in message
news:u9cxOY1yEHA.1292@TK2MSFTNGP10.phx.gbl...
> Gerald Ray was telling us:
> Gerald Ray nous racontait que :
>
>> 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
>>
>
> And how does it fail?
> Any error messages? What are they?
>
> If you debug, which line fails?
>
> --
> Salut!
> _______________________________________
> Jean-Guy Marcil - Word MVP
> jmarcilREMOVE@CAPSsympatico.caTHISTOO
> Word MVP site: http://www.word.mvps.org
>
>
>



Re: Word by Jean-Guy

Jean-Guy
Mon Nov 15 15:47:48 CST 2004

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

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