Thread: dim trouble
View Single Post
  #1   Report Post  
jocke
 
Posts: n/a
Default dim trouble


HI, i've made a small function that counts the seconds i hours and
minutes

if i try to convert hours larger then 9 i get an error that says my
variable isn't
declared right. but i can't see anything wrong

Help wanted


Function sec(Invarde As String) As Long
Dim mystring As String
Dim antal As Integer
Dim hour As Integer
Dim minute As Integer
mystring = Invarde
antal = Len(mystring)
hour = Left(mystring, antal - 3)
minute = Right(mystring, 2)
SEC = (HOUR * 3600) + (MINUTE * 60)
End Function


--
jocke
------------------------------------------------------------------------
jocke's Profile: http://www.excelforum.com/member.php...nfo&userid=766
View this thread: http://www.excelforum.com/showthread...hreadid=473737