467,151 Members | 949 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,151 developers. It's quick & easy.

Variable information between Forms

I am trying to write the VBA for 2 forms where the information on Form2 is dependant on what was selected in Form1.

Here is the wording for what I need and a sample of the code I have below:
If I have chosen OptionButton1 on Form1 and I choose OptionButton2 on Form2 then this happens.


Code:
If OptionButton2 = True Then
If Forms.Document.OptionButton1 = True Then
ActiveDocument.AttachedTemplate.AutoTextEntries( _
"XXXX").Insert Where:=Selection.Range
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End If
If Forms.Document.OptionButton2 = True Then
ActiveDocument.AttachedTemplate.AutoTextEntries( _
"XXXX").Insert Where:=Selection.Range
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End If
End If

What am I doing wrong?
Nov 29 '06 #1
  • viewed: 707
Share:

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by gallasr@post.sk | last post: by
4 posts views Thread by Bjorn Sagbakken | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.