Variable information between Forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sophiek
    New Member
    • Nov 2006
    • 1

    #1

    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. AttachedTemplat e.AutoTextEntri es( _
    "XXXX").Ins ert Where:=Selectio n.Range
    ActiveWindow.Ac tivePane.View.S eekView = wdSeekMainDocum ent

    End If
    If Forms.Document. OptionButton2 = True Then
    ActiveDocument. AttachedTemplat e.AutoTextEntri es( _
    "XXXX").Ins ert Where:=Selectio n.Range
    ActiveWindow.Ac tivePane.View.S eekView = wdSeekMainDocum ent
    End If
    End If

    What am I doing wrong?
Working...