Results 1 to 7 of 7

Thread: End Sub

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Chicago
    Posts
    59

    Question

    Whenever I try to use an End Sub in my If statement it wont work why is this and is there any way I can get around it.

    Matt

  2. #2
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279
    Try Exit Sub. That is, if I'm understanding you correctly.
    A cynic knows the price of everything but the value of nothing.

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    You cant do that. You use Exit sub.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Chicago
    Posts
    59

    Not working

    Alright I tried that but it isn't working either. Is there any way I can just make it stop running the code after the if statement. I'm pretty much just checking a textbox to see if it has any text before the user clicks the button.

    Matt

  5. #5
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279
    If text = "" then
    exit sub
    end if
    A cynic knows the price of everything but the value of nothing.

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    you may want to post your code. You condition isnt being met so you have done something else wrong. Its not the Exit Sub.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Chicago
    Posts
    59

    Lightbulb I'm an idiot

    Yup, I'm an idiot went back and checked my code, now it works fine.

    Thanks a lot,
    Matt

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