Question:

Vb6 source code is not compiling.

by  |  earlier

0 LIKES UnLike

I am trying to compile a source code of vb6 name building the time tracking system. The problem is somewhere in procedure. Kindly let me know the solution. The code is
Private Sub cmdOK_Click()Dim sngBilledTime As Single, iMinutes As Integer, iHours As IntegerDim iResponse As Integer If txtAmountOfTime.Text = "0.00" Then Msgbox "Your must enter the time spent." txtAmountOfTime.SetFocus Exit Sub ElseIf txtBillingRate.Text <= 0 Then Msgbox " You must enter the Billing Rate." txtBillingRate.SetFocus Exit Sub ElseIf lblBillingName.Caption = " " Then lblBillingName.Caption = InputBox("Please enter your name:") End If iResponse = Msgbox("Do you want to perview the invoice?", vbYesNo, "Invoice") If iResponse = vbNo Then End Else Load frmInvoice With frmInvoice .lblBilledBy .Caption = frmBillingInfor.lblBillingName .lblClient .Caption = frmBillingInfo.lstClient.Text .lblDate .Caption = frmBillingInfo.mskDate.Text .lblRate.Caption = Format(frmBillingInfo.txtBillingRate.Text, "Rs ####.00") .lblWorkCategory .Caption = frmBillingInfo.cboCategory.Text If frmBillingInfo.optByHour.Value = True Then .lblHourOrJob.Caption = "an Hour" iMinutes = Val(Right(Me.textAmountOfTime.Text, 2)) iHours = Left(Me.txtAmountOfTime.Text, (InStr(1, Me.txtAmountOfTime.Text, ":") - 1)) Select Case iMinutes Case Is < 15 If iHours > 0 Then sngBilledTime = iHours Else sngBilledTime = 0.5 End If Case Is >= 15 And iMinutes <= 30 sngBilledTime = iHours + 0.5 Case Is > 15 And iMinutes <= 30 sngBilledTime = iHours + 1 End Select .lblTotalAmount.Caption = Format(frmBillingInfo.txtBillingRate.Text * sngBilledTime, "Rs####.00") .lblTotalTime.Caption = sngBilledTime Else .lblHourOrJob = "form item" .lblTotalTime = "N/A" .lblTotalAmount = Format(.lblRate.Caption, "Rs####/00") End If End With
Unload Me frmInvoice.ShowEnd Sub
On compilation the message "invalid use of property" is coming and invoice window is not displayed.

 Tags:

   Report
Please Login to view 1 answers to this question

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.