By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,594 Members | 2,062 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,594 IT Pros & Developers. It's quick & easy.

Variable information between Forms

P: 1
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
Share this question for a faster answer!
Share on Google+

Post your reply

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