Results 1 to 3 of 3

Thread: radio buttons

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2005
    Posts
    21

    radio buttons

    hi, sorry for all the nooby questions

    i have 5 forms, 4 radio buttons in each, there is 1 question on each form, if the correct radio button is selected it is ment to open the next form, same thing to the end, if the wrong radio button is slected then a vbokonly error msg is to appear then return back to the form
    VB Code:
    1. Private Sub CommandButton1_Click()
    2. If OptionButton2.option = True Then
    3. Show UserForm2.form
    4. Else
    5. MsgBox " Wrong", vbOKOnly
    6. end

    i having a bit of trouble, as im linkthing this in word, a command is in word, ment to bring thr forms up in word, like a pop up, but when in visual basic and i press play it comes up the macors are disabled, how do i turn them on or make this work, also would that code work or is it close?


    thanks for all the help

  2. #2
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: radio buttons

    Menu: tools, macro, security and then choose a lower level.
    VB Code:
    1. If OptionButton2.Value = True Then
    2.     UserForm2.Show
    3. Else
    4.     MsgBox " Wrong", vbOKOnly
    5. End If
    If you want to close a previous form then use unload formname because end will end the whole app. Hope this helps

    Oh and i think you should have asked this in the office section as its a word problem
    Last edited by Andrew G; Nov 30th, 2005 at 02:20 AM.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: radio buttons

    Word VBA question moved to Office Development.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width