PDA

View Full Version : Visual Basic Help



CurryCricketer
June 9th, 2004, 04:41 AM
"So if you're lonely, you know i'm here waiting for you"

Hi i am trying to call a Public Sub is in Visual Basic but each time i try to call it i get "ByRef arugment type mismatch".

Does any one know how to fix this???
Here is the code

Public Sub Convert(lstCountryTo As ListBox, lstCountryFrom As ListBox, txtHours As TextBox, txtMinutes As TextBox, lstAMPM As ListBox, lblWhereTime As Label, lblFinTime As Label, ZoneF As Double, ZoneT As Double, Time As Date)

Dim Hours, Mins As Double
Dim Time As Date

Hours = txtHours.Text
Mins = txtMinutes.Text
FinTime = lblFinTime.Caption
FinTime = Format(Time, "hh:mm")

Select Case lstAMPM.Text
Case "PM"
If Hours = 12 Then
FinTime = TimeSerial(0, Mins, 0)
Else
FinTime = TimeSerial((Hours + 12), Mins, 0)
End If
Case "AM"
FinTime = TimeSerial(Hours, Mins, 0)
End Select

Call ZoneNum(lstCountryFrom, lstCountryTo, ZoneF, ZoneT)

Select Case (ZoneF - ZoneT)
Case Is = 1000
FinTime = DateAdd("h", -10, FinTime)
End Select


End Sub

Private Sub cmdConvert_Click()

Call Convert(lstCountryTo, lstCountryFrom, txtHours, txtMinutes, lstAMPM, lblWhereTime, lblFinTime, ZoneF, ZoneT, Time)

End Sub

thankyou

ahmed
June 9th, 2004, 03:18 PM
Do not cross-post please!