Results 1 to 5 of 5

Thread: Vb code

  1. #1
    Guest

    Question

    I need help i need to figure out how to write a code like this: "If label1.text "blah" and label2.text = "blah" and label3.text = "blah" then msgbox "blah"" THis isnt what im doing i am just using it as an example but i have tried almost everything and dont know how to do it.

  2. #2
    Addicted Member S@NSIS's Avatar
    Join Date
    Aug 2000
    Location
    Stoke-On-Trent, England
    Posts
    243

    Question

    HI,
    not sure exactly what it is you are trying to do. If you are trying to pass a string as piece of code and trying to get it to run, then the answer is you can't!
    If you want to show stuff as code on these forums then look
    here: http://forums.vb-world.net/index.php?action=bbcode

    Hope this helps

    Shaun
    Web/Application Developer
    VB6 Ent (SP5), Win 2000,SQL Server 2000

  3. #3
    Addicted Member
    Join Date
    May 1999
    Posts
    161
    Can you post your code ? What you describe here really doesn't sound hard...
    You may have a syntax error somewhere...

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    a label has a caption property, not a text property.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Lively Member
    Join Date
    Nov 1999
    Location
    Cincinnati, OH
    Posts
    66

    Post

    It sounds like you want to do something like this
    If Label1.caption = "X" and Label2.caption = "Y" And_
    Label3.Caption = "Z" Then MSGBOX "Blah"

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