Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 538565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:02:42+00:00 2026-05-13T10:02:42+00:00

I currently making an Excel VB application. However, I am stuck at the moment.

  • 0

I currently making an Excel VB application. However, I am stuck at the moment. I am trying to make the choice between two OptionButtons compulsory.

I tried the code

If Me.PWebOption.Value = False & Me.BWebOption = False Then
        MsgBox "Please choose a type of website"
        Exit Sub
End If

But this is not giving me the required results. I tried putting them in brackets and everything but still stuck. I’m sure this is a trivial answer but I am just getting to grips with VB so please forgive me.

Many thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:02:43+00:00Added an answer on May 13, 2026 at 10:02 am

    I tried your code and it works if you change & to And. I created 2 OptionButtons, named them and ran the code with “And” without problems.

    If it still doesn’t work then my guess is that:

    • one or both of your OptionButtons is not false

    or:

    • you are accessing the wrong OptionButtons.

    Try

    Debug.Print Me.PWebOption.Value
    Debug.Print Me.BWebOption.Value
    Debug.Print Me.PWebOption 'just for fun'
    Debug.Print Me.BWebOption 
    

    It should all return false. Also try putting Option Explicit at the head of your Code to ensure you are only accessing objects that actually exist.

    Note: In VBA & is only used for concatenation and: And, Or and Not are the logical operators.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently making a simple inventory system application using Excel VBA. I have a
I'm currently making a graphical application, and it will make my life a lot
I'm currently making an application with Backbone.js and some JQuery libraries. Today I work
I am currently making an MP3 player in WPF, and I want to make
I'm currently making a SMS Application in Android, the following is a code snippet
I am currently making a Facebook application for iOS that pulls the profile feed
I'm currently making an application which draws out a certain network of signs to
I trying to make automatic variables available to Excel VBA (like ActiveSheet or ActiveCell)
Greetings I'm currently making an application in WPF as I'm fairly new to WPF
I'm currently making an SMS viewing application and using the ContentResolver to obtain all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.