locked
VB6 RRS feed

  • Question

  • Hi Guys,

    I am new to coding world. Expecting a positive move:)

    Can anyone one of you tell me what is the value of Boolean variable in the following statement?

    Dim b as Boolean

    Set oXMLNodeList = oXMLNew.getElementsByTagName("veh:messages/veh:msg")

    b = (oXMLNodeList.length = 0)

    what is b?

    Friday, February 6, 2015 10:57 AM

Answers

  • The answer would be

    b = false if it finds elements within the  tagname  veh:messages/veh:msg

    b= true if it doesn't find elements

    But take note of cor's answer, vb6 is ancient history and defo not the place to start if you are new to coding



    • Edited by Rbie Friday, February 6, 2015 12:01 PM
    • Proposed as answer by IronRazerz Friday, February 6, 2015 12:07 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:47 PM
    Friday, February 6, 2015 12:00 PM
  • VB6 is an antique program language. 

    If you are new to the coding world then threw it soon in the thrash bin. You need licenses for that to develop with it, to use it or to sell it.

    Go to the newer tech. VB 12 in Visual Studio Community edition.

    It is free to develop with and to use it.

    http://www.visualstudio.com/


    Success
    Cor

    • Proposed as answer by IronRazerz Friday, February 6, 2015 1:12 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:47 PM
    Friday, February 6, 2015 11:54 AM
  • Classic VB is not supported in this forum - only Visual Basic .NET. Your question was answered but I would recommend posting future VB 6.0 questions to the below forums:

    http://vbcity.com/forums/default.aspx?GroupID=11

    http://www.vbforums.com/forumdisplay.php?1-Visual-Basic-6-and-Earlier


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Proposed as answer by IronRazerz Friday, February 6, 2015 1:12 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:48 PM
    Friday, February 6, 2015 1:03 PM

All replies

  • VB6 is an antique program language. 

    If you are new to the coding world then threw it soon in the thrash bin. You need licenses for that to develop with it, to use it or to sell it.

    Go to the newer tech. VB 12 in Visual Studio Community edition.

    It is free to develop with and to use it.

    http://www.visualstudio.com/


    Success
    Cor

    • Proposed as answer by IronRazerz Friday, February 6, 2015 1:12 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:47 PM
    Friday, February 6, 2015 11:54 AM
  • The answer would be

    b = false if it finds elements within the  tagname  veh:messages/veh:msg

    b= true if it doesn't find elements

    But take note of cor's answer, vb6 is ancient history and defo not the place to start if you are new to coding



    • Edited by Rbie Friday, February 6, 2015 12:01 PM
    • Proposed as answer by IronRazerz Friday, February 6, 2015 12:07 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:47 PM
    Friday, February 6, 2015 12:00 PM
  • Hi,

     A Boolean has a value of True or False.

     Using it in the line you have it would set the Boolean to True if oXMLNodeList.length = 0 and False if oXMLNodeList.length is not equal to 0.

     As Cor has mentioned, you would be better off getting a newer version of Visual Studio. Even the Express versions would be better and are free.   8)

    Dang It!! Rbie beat me this time.  lol


    If you say it can`t be done then i`ll try it

    • Edited by IronRazerz Friday, February 6, 2015 12:10 PM
    Friday, February 6, 2015 12:06 PM
  • "Dang It!! Rbie beat me this time.  lol"

    haha finaly

    Friday, February 6, 2015 12:15 PM
  • Classic VB is not supported in this forum - only Visual Basic .NET. Your question was answered but I would recommend posting future VB 6.0 questions to the below forums:

    http://vbcity.com/forums/default.aspx?GroupID=11

    http://www.vbforums.com/forumdisplay.php?1-Visual-Basic-6-and-Earlier


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Proposed as answer by IronRazerz Friday, February 6, 2015 1:12 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:48 PM
    Friday, February 6, 2015 1:03 PM
  • Hello,

    I am moving this question from this forum. Please use the second link provided by Paul to ask your question as they have a forum (second from the top) for just VB6.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    Friday, February 6, 2015 1:35 PM