|
-
Apr 27th, 2000, 12:05 AM
#1
Dim Hours As Integer
Dim Mins As Integer
Dim Pos As Integer
Dim myTime As String
myTime = lblCompTotal.Caption
Pos = InStr(1, myTime, ":")
Hours = Mid$(myTime, 1, Pos - 1)
Mins = Mid$(myTime, Pos + 1, Len(myTime))
Text222.Text = Hours + Mins
The error message I get is type mismatch at
Mins = Mid$(myTime, Pos + 1, Len(myTime))
Can someone tell me what I have wrong here
I'm trying to take a string of 40:15 and put the 40 in HOURS and the 14 in MINS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|