Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculating the difference between hours


Thanks for ur prompt respons
I would like to tell that i used thi
formula:=HoursWorked(A2;A3;TIME(7;30;0);TIME(15;30 ;0);AR3:AS3)


when i run it it's stop in this step:

Private Function GetWorkdays(Date1 As Long, Date2 As Long, _
Optional Holidays As Range = Nothing) As Long

'NB: Thursday and Friday are weekend days, so add 2 to the dates
'when calling NETWORKDAYS so the ATP function will think Thu and Fri
'are Sat and Sun, and thus not working days

If Holidays Is Nothing Then
GetWorkdays = NETWORKDAYS(Date1 + 2, Date2 + 2)
Else
GetWorkdays = NETWORKDAYS(Date1 + 2, Date2 + 2, Holidays)
End If
End Function


With this error Message: Sub or Function not defined

hope u can put the examble i gave u in excel & post it here pls



Thanks
WAITING
SAMI :confused

--
Sambus
-----------------------------------------------------------------------
Sambusa's Profile: http://www.excelforum.com/member.php...fo&userid=1496
View this thread: http://www.excelforum.com/showthread.php?threadid=26588

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Calculating the difference between hours

I'm assuming it stopped on the line that includes NETWORKDAYS.

We've gone through all of this before!!

YOU MUST INSTALL THE ANALYSIS TOOL PACK. That's where the NETWORKDAYS function
is found. In the VB Editor, go to Tools/References, and check it on the list.

You say you had the function working in the past but the result was wrong.
That means you had done this before. I guess you must have pasted the new
function into a new workbook. You have to set the reference to ATP for every
workbook that contains a macro that uses its functions.

Remember also, for the holiday list, you must add 2 to each of the dates on
that list to handle the fact that your weekend days are Thu and Fri.


On Tue, 12 Oct 2004 00:34:31 -0500, Sambusa
wrote:


Thanks for ur prompt respons
I would like to tell that i used this
formula:=HoursWorked(A2;A3;TIME(7;30;0);TIME(15;3 0;0);AR3:AS3)


when i run it it's stop in this step:

Private Function GetWorkdays(Date1 As Long, Date2 As Long, _
Optional Holidays As Range = Nothing) As Long

'NB: Thursday and Friday are weekend days, so add 2 to the dates
'when calling NETWORKDAYS so the ATP function will think Thu and Fri
'are Sat and Sun, and thus not working days

If Holidays Is Nothing Then
GetWorkdays = NETWORKDAYS(Date1 + 2, Date2 + 2)
Else
GetWorkdays = NETWORKDAYS(Date1 + 2, Date2 + 2, Holidays)
End If
End Function


With this error Message: Sub or Function not defined

hope u can put the examble i gave u in excel & post it here pls



Thanks
WAITING
SAMI


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Analysis Tool Pack VBA

When I compile my VBA and sent it out to users, do the users have to install
the Analysis Tool Pack in their copy of the VBA project in order to use any
part of the Excel forms I created?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Analysis Tool Pack VBA

Not unless you call functions from the analysis toolpak.

--
Regards,
Tom Ogilvy

"jenelle" wrote in message
...
When I compile my VBA and sent it out to users, do the users have to

install
the Analysis Tool Pack in their copy of the VBA project in order to use

any
part of the Excel forms I created?



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
Calculating the difference between hours Sambusa[_5_] Excel Programming 2 October 4th 04 08:08 PM
Calculating the difference between hours Sambusa[_6_] Excel Programming 2 October 4th 04 06:44 PM
Calculating the difference between hours Sambusa[_3_] Excel Programming 1 October 4th 04 02:20 PM
Calculating the difference between hours Sambusa[_2_] Excel Programming 0 October 3rd 04 05:28 PM
Calculating the difference between hours Sambusa Excel Programming 1 October 3rd 04 05:05 PM


All times are GMT +1. The time now is 12:58 PM.

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"