Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default My (old) function that I wrote doesn't work anymore!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default My (old) function that I wrote doesn't work anymore!

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
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
Macros do not work anymore! fak119 Excel Discussion (Misc queries) 4 September 28th 09 05:54 PM
code does not work anymore Wanna Learn Excel Discussion (Misc queries) 2 July 24th 08 03:51 PM
I am having difficulty getting nested subtotals to work anymore?! Alyse Excel Worksheet Functions 0 April 30th 07 05:00 PM
Why doesn't it work anymore? daver39 Excel Discussion (Misc queries) 1 November 13th 06 04:56 PM
formulas don't work anymore john Excel Discussion (Misc queries) 3 November 18th 05 04:11 PM


All times are GMT +1. The time now is 12:08 AM.

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

About Us

"It's about Microsoft Excel"