+ Reply to Thread
Results 1 to 9 of 9

VBA Option Button question

  1. #1
    Registered User
    Join Date
    08-05-2005
    Posts
    59

    Angry VBA Option Button question

    Hi,

    Im my form, i've got two questions both require a yes/no answer.

    The problem i'm getting is that I can't select an option for both questions.

    Public Sub UserForm_Initialize()
    optexpiredY1.Value = ""
    optexpiredN1.Value = ""
    optlockedY1.Value = ""
    optlockedN1.Value = ""

    I have a multipage of 6 tabs 4 tabs have the same questions, but named differently, according to the tab number.


    Is there anyway I could answer both questions?

  2. #2
    Bob Phillips
    Guest

    Re: VBA Option Button question

    Use checkboxes not optionbuttons.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "harpscardiff" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > Im my form, i've got two questions both require a yes/no answer.
    >
    > The problem i'm getting is that I can't select an option for both
    > questions.
    >
    > Public Sub UserForm_Initialize()
    > optexpiredY1.Value = ""
    > optexpiredN1.Value = ""
    > optlockedY1.Value = ""
    > optlockedN1.Value = ""
    >
    > I have a multipage of 6 tabs 4 tabs have the same questions, but named
    > differently, according to the tab number.
    >
    >
    > Is there anyway I could answer both questions?
    >
    >
    > --
    > harpscardiff
    > ------------------------------------------------------------------------
    > harpscardiff's Profile:

    http://www.excelforum.com/member.php...o&userid=25960
    > View this thread: http://www.excelforum.com/showthread...hreadid=518165
    >




  3. #3
    Peter T
    Guest

    Re: VBA Option Button question

    If you particularly need Option buttons and not checkboxes, put each set of
    buttons in separate frames.

    To disguise use of frames you could set the SpecialEffect property of the
    frame to 0/flat and remove caption.

    Regards,
    Peter T

    "harpscardiff" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > Im my form, i've got two questions both require a yes/no answer.
    >
    > The problem i'm getting is that I can't select an option for both
    > questions.
    >
    > Public Sub UserForm_Initialize()
    > optexpiredY1.Value = ""
    > optexpiredN1.Value = ""
    > optlockedY1.Value = ""
    > optlockedN1.Value = ""
    >
    > I have a multipage of 6 tabs 4 tabs have the same questions, but named
    > differently, according to the tab number.
    >
    >
    > Is there anyway I could answer both questions?
    >
    >
    > --
    > harpscardiff
    > ------------------------------------------------------------------------
    > harpscardiff's Profile:

    http://www.excelforum.com/member.php...o&userid=25960
    > View this thread: http://www.excelforum.com/showthread...hreadid=518165
    >




  4. #4
    Registered User
    Join Date
    08-05-2005
    Posts
    59
    Thanks for that - is there any way to have the check boxes set so that they are blank?

  5. #5
    Bob Phillips
    Guest

    Re: VBA Option Button question

    Yeah,

    cbExpired.Value = False

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "harpscardiff" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Thanks for that - is there any way to have the check boxes set so that
    > they are blank?
    >
    >
    > --
    > harpscardiff
    > ------------------------------------------------------------------------
    > harpscardiff's Profile:

    http://www.excelforum.com/member.php...o&userid=25960
    > View this thread: http://www.excelforum.com/showthread...hreadid=518165
    >




  6. #6
    Tom Ogilvy
    Guest

    Re: VBA Option Button question

    Easier (IMO) would be to give each set a separate groupname property. It
    doesn't make any difference what it is, just so it is unique among sets and
    common within sets of optionbuttons.

    --
    Regards,
    Tom Ogilvy

    "Peter T" <peter_t@discussions> wrote in message
    news:[email protected]...
    > If you particularly need Option buttons and not checkboxes, put each set

    of
    > buttons in separate frames.
    >
    > To disguise use of frames you could set the SpecialEffect property of the
    > frame to 0/flat and remove caption.
    >
    > Regards,
    > Peter T
    >
    > "harpscardiff" <[email protected]>
    > wrote in message
    > news:[email protected]...
    > >
    > > Hi,
    > >
    > > Im my form, i've got two questions both require a yes/no answer.
    > >
    > > The problem i'm getting is that I can't select an option for both
    > > questions.
    > >
    > > Public Sub UserForm_Initialize()
    > > optexpiredY1.Value = ""
    > > optexpiredN1.Value = ""
    > > optlockedY1.Value = ""
    > > optlockedN1.Value = ""
    > >
    > > I have a multipage of 6 tabs 4 tabs have the same questions, but named
    > > differently, according to the tab number.
    > >
    > >
    > > Is there anyway I could answer both questions?
    > >
    > >
    > > --
    > > harpscardiff
    > > ------------------------------------------------------------------------
    > > harpscardiff's Profile:

    > http://www.excelforum.com/member.php...o&userid=25960
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=518165
    > >

    >
    >




  7. #7
    Peter T
    Guest

    Re: VBA Option Button question

    Help > GroupName agrees with you -

    "GroupName is more efficient for the following reasons...."

    Frames also have advantages depending on what else might want to do.

    Not sure why the OP is going the checkbox route, sets of optionbuttons would
    seem suitable for each mutually exclusive "yes/no" pair.

    Regards,
    Peter T

    "Tom Ogilvy" <[email protected]> wrote in message
    news:#[email protected]...
    > Easier (IMO) would be to give each set a separate groupname property. It
    > doesn't make any difference what it is, just so it is unique among sets

    and
    > common within sets of optionbuttons.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Peter T" <peter_t@discussions> wrote in message
    > news:[email protected]...
    > > If you particularly need Option buttons and not checkboxes, put each set

    > of
    > > buttons in separate frames.
    > >
    > > To disguise use of frames you could set the SpecialEffect property of

    the
    > > frame to 0/flat and remove caption.
    > >
    > > Regards,
    > > Peter T
    > >
    > > "harpscardiff"

    <[email protected]>
    > > wrote in message
    > > news:[email protected]...
    > > >
    > > > Hi,
    > > >
    > > > Im my form, i've got two questions both require a yes/no answer.
    > > >
    > > > The problem i'm getting is that I can't select an option for both
    > > > questions.
    > > >
    > > > Public Sub UserForm_Initialize()
    > > > optexpiredY1.Value = ""
    > > > optexpiredN1.Value = ""
    > > > optlockedY1.Value = ""
    > > > optlockedN1.Value = ""
    > > >
    > > > I have a multipage of 6 tabs 4 tabs have the same questions, but named
    > > > differently, according to the tab number.
    > > >
    > > >
    > > > Is there anyway I could answer both questions?
    > > >
    > > >
    > > > --
    > > > harpscardiff

    > >

    > ------------------------------------------------------------------------
    > > > harpscardiff's Profile:

    > > http://www.excelforum.com/member.php...o&userid=25960
    > > > View this thread:

    > http://www.excelforum.com/showthread...hreadid=518165
    > > >

    > >
    > >

    >
    >




  8. #8
    Bob Phillips
    Guest

    Re: VBA Option Button question

    have 2 controls when one would do?

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Peter T" <peter_t@discussions> wrote in message
    news:[email protected]...
    > Help > GroupName agrees with you -
    >
    > "GroupName is more efficient for the following reasons...."
    >
    > Frames also have advantages depending on what else might want to do.
    >
    > Not sure why the OP is going the checkbox route, sets of optionbuttons

    would
    > seem suitable for each mutually exclusive "yes/no" pair.
    >
    > Regards,
    > Peter T
    >
    > "Tom Ogilvy" <[email protected]> wrote in message
    > news:#[email protected]...
    > > Easier (IMO) would be to give each set a separate groupname property.

    It
    > > doesn't make any difference what it is, just so it is unique among sets

    > and
    > > common within sets of optionbuttons.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "Peter T" <peter_t@discussions> wrote in message
    > > news:[email protected]...
    > > > If you particularly need Option buttons and not checkboxes, put each

    set
    > > of
    > > > buttons in separate frames.
    > > >
    > > > To disguise use of frames you could set the SpecialEffect property of

    > the
    > > > frame to 0/flat and remove caption.
    > > >
    > > > Regards,
    > > > Peter T
    > > >
    > > > "harpscardiff"

    > <[email protected]>
    > > > wrote in message
    > > > news:[email protected]...
    > > > >
    > > > > Hi,
    > > > >
    > > > > Im my form, i've got two questions both require a yes/no answer.
    > > > >
    > > > > The problem i'm getting is that I can't select an option for both
    > > > > questions.
    > > > >
    > > > > Public Sub UserForm_Initialize()
    > > > > optexpiredY1.Value = ""
    > > > > optexpiredN1.Value = ""
    > > > > optlockedY1.Value = ""
    > > > > optlockedN1.Value = ""
    > > > >
    > > > > I have a multipage of 6 tabs 4 tabs have the same questions, but

    named
    > > > > differently, according to the tab number.
    > > > >
    > > > >
    > > > > Is there anyway I could answer both questions?
    > > > >
    > > > >
    > > > > --
    > > > > harpscardiff
    > > >

    > > ------------------------------------------------------------------------
    > > > > harpscardiff's Profile:
    > > > http://www.excelforum.com/member.php...o&userid=25960
    > > > > View this thread:

    > > http://www.excelforum.com/showthread...hreadid=518165
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >




  9. #9
    Peter T
    Guest

    Re: VBA Option Button question

    Ah, of course !

    Regards,
    Peter

    "Bob Phillips" <[email protected]> wrote in message
    news:#[email protected]...
    > have 2 controls when one would do?
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Peter T" <peter_t@discussions> wrote in message
    > news:[email protected]...
    > > Help > GroupName agrees with you -
    > >
    > > "GroupName is more efficient for the following reasons...."
    > >
    > > Frames also have advantages depending on what else might want to do.
    > >
    > > Not sure why the OP is going the checkbox route, sets of optionbuttons

    > would
    > > seem suitable for each mutually exclusive "yes/no" pair.
    > >
    > > Regards,
    > > Peter T
    > >
    > > "Tom Ogilvy" <[email protected]> wrote in message
    > > news:#[email protected]...
    > > > Easier (IMO) would be to give each set a separate groupname property.

    > It
    > > > doesn't make any difference what it is, just so it is unique among

    sets
    > > and
    > > > common within sets of optionbuttons.
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > > "Peter T" <peter_t@discussions> wrote in message
    > > > news:[email protected]...
    > > > > If you particularly need Option buttons and not checkboxes, put each

    > set
    > > > of
    > > > > buttons in separate frames.
    > > > >
    > > > > To disguise use of frames you could set the SpecialEffect property

    of
    > > the
    > > > > frame to 0/flat and remove caption.
    > > > >
    > > > > Regards,
    > > > > Peter T
    > > > >
    > > > > "harpscardiff"

    > > <[email protected]>
    > > > > wrote in message
    > > > > news:[email protected]...
    > > > > >
    > > > > > Hi,
    > > > > >
    > > > > > Im my form, i've got two questions both require a yes/no answer.
    > > > > >
    > > > > > The problem i'm getting is that I can't select an option for both
    > > > > > questions.
    > > > > >
    > > > > > Public Sub UserForm_Initialize()
    > > > > > optexpiredY1.Value = ""
    > > > > > optexpiredN1.Value = ""
    > > > > > optlockedY1.Value = ""
    > > > > > optlockedN1.Value = ""
    > > > > >
    > > > > > I have a multipage of 6 tabs 4 tabs have the same questions, but

    > named
    > > > > > differently, according to the tab number.
    > > > > >
    > > > > >
    > > > > > Is there anyway I could answer both questions?
    > > > > >
    > > > > >
    > > > > > --
    > > > > > harpscardiff
    > > > >

    > >

    > ------------------------------------------------------------------------
    > > > > > harpscardiff's Profile:
    > > > > http://www.excelforum.com/member.php...o&userid=25960
    > > > > > View this thread:
    > > > http://www.excelforum.com/showthread...hreadid=518165
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1