<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Need help with visual basic please' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Need help with visual basic please' posted on the 'VB.NET' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 15:06:22 -0700</pubDate>
    <lastBuildDate>Wed, 19 Jun 2013 15:06:22 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Need help with visual basic please</title>
      <link>http://www.programmersheaven.com/mb/VBNET/422537/422537/need-help-with-visual-basic-please/</link>
      <description>I've tried so hard by myself and I've just ended up confusing myself as it's my first time using vb.&lt;br /&gt;
I didn't want to waste anyones time but I'm sorry I just don't know what to do..&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
How would I code this?&lt;br /&gt;
&lt;br /&gt;
I want to make a progress bar that runs when a button is clicked. &lt;br /&gt;
However there is also a checkbox and textbox that affect the whole thing.&lt;br /&gt;
&lt;br /&gt;
If the checkbox is checked and there are characters in the text box, the button works and starts the progress bar.&lt;br /&gt;
If the checkbox isn't checked and/or the textbox is empty, an error message comes up when the button is pressed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I can almost code it but I get stuck at&lt;pre class="sourcecode"&gt; Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If String.IsNullOrEmpty(TextBox1.Text) Then
            Button1.Enabled = False
        Else
            Button1.Enabled = True
        End If

        If CheckBox1.Checked = False Then
            Button1_Click(MsgBox("Error. The checkbox must be ticked"))&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
As you probably know, that isn't right but I just don't know what to do next :(&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please help thankyou so much.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/422537/422537/need-help-with-visual-basic-please/</guid>
      <pubDate>Thu, 17 Mar 2011 15:40:43 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Need help with visual basic please</title>
      <link>http://www.programmersheaven.com/mb/VBNET/422537/422550/re-need-help-with-visual-basic-please/#422550</link>
      <description>You don't really need the checkbox_changed event, though I would leave in the first bit that disables the button, doesn't hurt, just delete the rest. You'll need to use the button click event, something like this should suffice: &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Const ErrMessage1 As String = "Error: You have not entered any text"
        Const ErrMessage2 As String = "Error: You have not ticked the box"
        If String.IsNullOrEmpty(TextBox1.Text) Then GoTo Err1
        If CheckBox1.Checked = False Then GoTo Err2
        &lt;span style="color: Green;"&gt;'If you have made it this far there are no errors, so run code...&lt;/span&gt;
        RunRoutineThatHappensAfterClickingTheButton()
        Exit Sub
Err1:
        MsgBox(errmessage1)
        Exit Sub
Err2:
        MsgBox(ErrMessage2)
    End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
By the way, you may want to use a timer and public variables to know when to change the progress bar. Hope this helps, Dai&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
------------------------------------------&lt;br /&gt;
Do or do not, there is no try.  |&lt;br /&gt;
------------------------------------------</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/422537/422550/re-need-help-with-visual-basic-please/#422550</guid>
      <pubDate>Fri, 18 Mar 2011 03:33:07 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Need help with visual basic please</title>
      <link>http://www.programmersheaven.com/mb/VBNET/422537/422557/re-need-help-with-visual-basic-please/#422557</link>
      <description>This is helpful but only the error message for the checkbox works :s&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/422537/422557/re-need-help-with-visual-basic-please/#422557</guid>
      <pubDate>Fri, 18 Mar 2011 08:47:45 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Need help with visual basic please</title>
      <link>http://www.programmersheaven.com/mb/VBNET/422537/422558/re-need-help-with-visual-basic-please/#422558</link>
      <description>never mind I forgot the textbox i wanted filled was textbox2 not textbox1&lt;br /&gt;
&lt;br /&gt;
and after using your coding, it worked perfectly! thanks so much&lt;br /&gt;
&lt;br /&gt;
however i had to delete the const. errmessage part for it to work&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
anyway thanks so much!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/422537/422558/re-need-help-with-visual-basic-please/#422558</guid>
      <pubDate>Fri, 18 Mar 2011 09:01:46 -0700</pubDate>
      <category>VB.NET</category>
    </item>
  </channel>
</rss>