FixYa.com
Technical Support, Instructions & Repair Service


Tags:

Operating Systems
Generic problem for all Operating Systems

Vb6 source code is not compiling.

posted by rajesh765 on Apr 13, 2008


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 Integer
Dim 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.Show
End Sub
On compilation the message "invalid use of property" is coming and invoice window is not displayed.

This Problem has been added to the Share Your Expertise Page under "My Work Queue".
Solution #1
posted on Jun 10, 2008
Not Rated (0)

Saigua


Rank:Wiz Wiz
Rating: 79%, 78 votes
What the heck are you compiling it with that doesn't give a line number for that error? Pay attention to the titles of messageboxes! Perhaps noting what lines you changed from the original will give a clue to narrow it down, but I expect you addressed an object with a property (object.property) in a context that can't be expected to generate or use that property as you gave it. Moreover there are spaces in object names, it seems....

Was this solution helpful? Show your Appreciation by rating it:

This Problem Also Relates To: HP Microsoft Windows Server 2003 Terminal Server for PC HP Enterprise Linux WS 3 (372725B21) for Linux Apple Mac OS X 10.4 Apple Mac OS X Server for Mac Apple Mac OS X 10.2 (603-1310-a) for Mac Apple Mac OS X Jaguar 10.2 (M8712LL/A) for Mac Apple Mac OS X Server 10.1 (M8585Z/A) for Mac

Can you Help with these Operating Systems problems?

Microsoft Windows Vista Ultimate Edition
paper rolls out when tring to...
i have vista ultimate and i was... Answer This...
Microsoft Windows Vista Ultimate Edition
expressit lable for dvd rolls...
i need a solution I am asking... Answer This...
Operating Systems
My Sandisk Sansa e250r keeps...
I have tried many things to fix... Answer This...
Microsoft Windows Vista Ultimate Edition
boot sequence order for dc5700...
i am having probs with... Answer This...
Microsoft Windows XP Professional
Defragment does not work
Hi, I have window XP pro... Answer This...
Repair Service
Find Operating System Repairman Near You:

FixYa does not evaluate or guarantee the accuracy of any information provided through its proposed solutions, posts, or Expert Assistance Sessions. By entering this site you declare you read and agreed to its Terms. You may NOT copy or distribute the content that appears on this site without written permission from FixYa Inc.
© 2005-2008, FixYa, Inc. or its affiliates
When the original poster rates a solution that was given to his own problem, that rating is locked!
X

Are you sure the solution content is Inappropriate?
   
Tech buddies can communicate directly to answer questions. Become a Tech Buddy and have direct access to your favorite expert for FREE!