Prev Previous Post   Next Post Next
  #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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having trouble totaling columns in excel 2003, always worked b4 rjmac Excel Worksheet Functions 1 June 24th 05 07:01 PM
trouble shooting section danielle Excel Discussion (Misc queries) 1 April 25th 05 10:11 PM
still having trouble with this.... nick Excel Worksheet Functions 4 March 13th 05 07:40 PM
Trouble opening an Excel file that contains macros JohnR Excel Worksheet Functions 1 March 8th 05 08:09 PM
Trouble with Dates between 2 seperate worksheets Julie Excel Discussion (Misc queries) 3 March 4th 05 07:57 PM


All times are GMT +1. The time now is 11:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"