Results 1 to 40 of 159

Thread: [RESOLVED] Piecework Visual Basic 6.0

Hybrid View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    Singapore
    Posts
    99

    Re: Piecework Visual Basic 6.0

    you mean Erase The Select Case statement off the line

    Compile Error
    Expected End of the Line .

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    Singapore
    Posts
    99

    Re: Piecework Visual Basic 6.0

    VB Code:
    1. 'to calculate totals use this:
    2. Private Sub cmdCalc_Click()
    3.  
    4.  
    5.     'validate first textbox
    6.     With Text1
    7.         If Not IsNumeric(Trim(.Text)) Then
    8.             MsgBox "Invalid entry"
    9.             .SelStart = 0
    10.             .SelLength = Len(.Text)
    11.             .SetFocus
    12.             Exit Sub
    13.         End If
    14.     End With
    15.         'validate second textbox
    16.     With Text2
    17.         If Not IsNumeric(Trim(.Text)) Then
    18.             MsgBox "Invalid entry"
    19.             .SelStart = 0
    20.             .SelLength = Len(.Text)
    21.             .SetFocus
    22.             Exit Sub
    23.         End If
    24.     End With
    25.         'calculate total amount
    26.     txtTotal.Text = Format(CCur(Text1.Text) + CCur(Text1.Text), "$0.00")
    27.  
    28. End Sub


    Must i add this line to my summary and calculate button?

    Or only calculate button?

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Piecework Visual Basic 6.0

    Do you need a summary total?

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