Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I wrote this a few years back for a time tracking sheet I made. I wanted to use it again and fired it up but.... it's not working in excel-xp. The function shows that it requires no arguments now, even though it should require 4. Any help would be appreciated. here is the snippet: note some lines wrapped.... Option Explicit Public Function Calcdowntime(ByVal downdate As Long, downtime As Long, update As Long, uptime As Long) As Long Dim dd As Long Dim dt As Long Dim ud As Long Dim ut As Long Dim dm As Long Dim um As Long Dim dh As Long Dim uh As Long Dim dttm As Long Dim utfm As Long Dim days As Long days = update - downdate dm = downtime Mod 100 um = uptime Mod 100 dh = Int(downtime / 100) uh = Int(uptime / 100) dttm = ((24 - dh) * 60) - dm utfm = (uh * 60) + um Calcdowntime = (dttm + utfm) + ((days - 1) * 1440) End Function If you have any ideas - please let me know. Thanks Jimmy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
worked exactly as is for me O/SX Pro & excel xp
make sure that you have it in a standard Module, ie NOT in a sheet's code page nor in a class module. -- Patrick Molloy Microsoft Excel MVP ---------------------------------- "Jimmy" <no@no wrote in message ... Hi, I wrote this a few years back for a time tracking sheet I made. I wanted to use it again and fired it up but.... it's not working in excel-xp. The function shows that it requires no arguments now, even though it should require 4. Any help would be appreciated. here is the snippet: note some lines wrapped.... Option Explicit Public Function Calcdowntime(ByVal downdate As Long, downtime As Long, update As Long, uptime As Long) As Long Dim dd As Long Dim dt As Long Dim ud As Long Dim ut As Long Dim dm As Long Dim um As Long Dim dh As Long Dim uh As Long Dim dttm As Long Dim utfm As Long Dim days As Long days = update - downdate dm = downtime Mod 100 um = uptime Mod 100 dh = Int(downtime / 100) uh = Int(uptime / 100) dttm = ((24 - dh) * 60) - dm utfm = (uh * 60) + um Calcdowntime = (dttm + utfm) + ((days - 1) * 1440) End Function If you have any ideas - please let me know. Thanks Jimmy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macros do not work anymore! | Excel Discussion (Misc queries) | |||
code does not work anymore | Excel Discussion (Misc queries) | |||
I am having difficulty getting nested subtotals to work anymore?! | Excel Worksheet Functions | |||
Why doesn't it work anymore? | Excel Discussion (Misc queries) | |||
formulas don't work anymore | Excel Discussion (Misc queries) |