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

  • Home
  • SEARCH
  • 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 9253105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:07:53+00:00 2026-06-18T11:07:53+00:00

I am trying to get my VBScript to report the proper value of a

  • 0

I am trying to get my VBScript to report the proper value of a clicked button in a Message Box.

intAnswer =  Msgbox("Enter Data", _
        4, "Answer")
msgbox(intAnswer)
If intAnswer = 6 Then
    Msgbox "You answered yes."
ElseIf intAnswer = 7 Then
    Msgbox "You answered no."
ElseIf intAnswer = 2 Then
    MsgBox "Cancelled."
End If

But, that first msgbox(intAnswer) always reports “False.” It’s never the VBScript constants I am expecting, so I never get any of the If Then Else statements.

I have tried vbYesNo instead of just 4. I thought they constant definitions might not be on the server, but it does not matter.

What am I doing wrong? How can I get my msgbox response to be a constant?

edit: this is a vbscript running on the command line a .vbs file (or double-click it from explorer).

edit: I have tried cint(intanswer) but I get the same result zero 0 in this case.

edit: further test reveals it only occurs on the server. the local machine works just fine.

  • 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-06-18T11:07:54+00:00Added an answer on June 18, 2026 at 11:07 am

    I found extraneous code. It was a simple error. Removed it. All is well.

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

Sidebar

Related Questions

Trying to get a random string out of ListArray on the button pressed. Always
I regularly enter data to a third party database. I'm trying to make a
I am trying to get the key, value attributes of the xml using the
I am trying to get the value of the posted textbox using jquery AJAX:
I am trying to get VBSCript to pass configure call gcid splitArray(x) delete for
Bah, vbscript. I'm trying to figure out how to get this statement to work:
I'm trying to submit some post data form using vbscript. The site I'm posting
I can't get the following function in VBScript to work. I am trying to
I am having trouble trying to get my VBscript to read the version number
So i am trying get 2 div-containers which both should contain centered text (Both

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.