Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8637423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:28:43+00:00 2026-06-12T10:28:43+00:00

Need some help finishing up this program, everything works and runs like I want

  • 0

Need some help finishing up this program, everything works and runs like I want it but I need to display an inputbox that allows the user to enter in the date they want for their invoice stored in service_date and then this date will display in the listbox with all the other items that I have put in there. I know I need to use the AddDays function but I have no clue on how to do it, and researching online has just led me to 100 other things that aren’t that.

So here is my code:

 Dim Customer As String
Dim Phone As String
Dim Hours As Double
Dim Parts As Double
Dim due_date As String
Dim service_date As String

Private Sub cmdInputBox_Click()

    Dim service_date = InputBox("Enter the date of service. (MM/DD?YYYY)")
    MsgBox("That's your date, " & service_date.ToString)
    Exit Sub
End Sub

Private Sub CustInfo_Click()

    Customer = txtCustomer.Text
    Phone = mtbPhone.Text

    Double.TryParse(txtHours.Text, Hours)
    Double.TryParse(txtParts.Text, Parts)

    If Customer.Length < 0 Then
        MessageBox.Show("Please enter customer information.")
    End If

    If Phone = "" Then
        MessageBox.Show("Please enter phone number.")
    End If

    If Not Double.TryParse(txtHours.Text, Hours) Then
        MessageBox.Show("Please enter labor hours.")
    End If

    If Not Double.TryParse(txtParts.Text, Parts) Then
        MessageBox.Show("Please enter parts and supplies.")
    End If

    ''Perform calculations

    Dim Total_Cost As Double
    Dim Labor_Cost As Double
    Dim Parts_Cost As Double

    Parts_Cost = (Parts * 0.5 * 2)
    Labor_Cost = (Hours * 35)
    Total_Cost = (Hours + Parts)


    Customer = txtCustomer.Text
    Phone = mtbPhone.Text

    lstBill.Items.Clear()
    lstBill.Items.Add("Customer: " & vbTab & Customer.ToUpper)
    lstBill.Items.Add("Phone: " & vbTab & vbTab & Phone)
    lstBill.Items.Add("Service Date: " & vbTab & due_date)
    lstBill.Items.Add("Invoice Date: " & vbTab & service_date)
    lstBill.Items.Add("Labor Cost: " & vbTab & FormatCurrency(Labor_Cost))
    lstBill.Items.Add("Parts Cost: " & vbTab & FormatCurrency(Parts_Cost))
    lstBill.Items.Add("Total Cost: " & vbTab & FormatCurrency(Total_Cost))
    Exit Sub
End Sub

Private Sub btnBill_Click(sender As System.Object, e As System.EventArgs) Handles btnBill.Click

    cmdInputBox_Click()

    CustInfo_Click()

End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:28:44+00:00Added an answer on June 12, 2026 at 10:28 am

    Try this:

    Dim strDate As String = InputBox("Enter date?", , "")
    If strDate = "" Then Exit Sub
    Dim dteDate As Date
    Dim enUS As New System.Globalization.CultureInfo("en-US")
    If Date.TryParseExact(strDate, "MM/dd/yyyy", enUS, Globalization.DateTimeStyles.AssumeLocal, dteDate) Then
      MsgBox("Date is " & dteDate.ToString)
    End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need some help assigning a mouseover event to display some icons that start out
Need some help joining these two tables I have two views that looks like
Need some help refactoring this if/else block that builds the conditions for a find
Need some help... I have jasperserver 4.1 installed on my ubuntu. It runs via
Need some help to solve this. I have a gridview and inside the gridview
Need some help with this problem in implementing with XSLT, I had already implemented
Need some help gathering thoughts on this issue. Our team is moving ahead with
Need some help with DataFormatString in GridView. I have a Double value that needs
Need some help with crypto routines in Java. Given a PKCS#7 signature, I want
Need some help, I have a regular expression that appears to work just fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.