I have spent the last few hours reading the forums here and googling / searching the help files for an answer to this. I am rather new to VB, i just stated learning it on my own a couple weeks ago and this is my first program. So any links or books you would suggest would be helpful also.
I am trying to write a build time estimator. I have the resources set via user input text boxes(tbwoodrequiredresources.text & tbwoodcompletion.text), with the output currently displayed in another text box(tbwoodcompletion.text).
What i want is to be able to make "6" set by the tbwoodcompletion.text.
As it stands right now the tbwoodcompletion.text outputs a decimal number that i just use a standard 100:60 conversion chart to manually figure out what time it will finish, but i would prefer to automate it when the click event happens it adds the estimated build time to the current system time.Code:If IsNumeric(tbWoodRequiredResources.Text) Then If tbWoodRequiredResources.Text > tbWoodCurrent.Text Then 'This line calculates the estimated time to completion and returns a decimal 'Value in the form of hour.min tbWoodCompletion.Text = (tbWoodRequiredResources.Text - tbWoodCurrent.Text) / _ tbWoodPPH.Text 'This line displays the required resources to complete tbWoodDiff.Text = tbWoodRequiredResources.Text - tbWoodCurrent.Text 'Can not figure this section out, so it just displays a hard coded time to 'completion. lbltest.Text = DateAdd("h", 6, Now) Else 'error handling section tbWoodCompletion.Text = "0" tbWoodDiff.Text = tbWoodRequiredResources.Text - tbWoodCurrent.Text End If Else 'Error message if nothing was entered into the text box MessageBox.Show("You did not enter a number for Wood Building") End If
Thanks


Reply With Quote