Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ABG ABG is offline
external usenet poster
 
Posts: 8
Default how to use workdays or networkdays in VBA

I have a macro that needs either Workdays or networkdays to determine the
number of workdays in a month.
I have installed the "Analysis Tool Pack" and "Analysis Took Pack - VBA"
into Excel.
I am trying to use "application.worksheetfunction.networkdays(... ..)"
however after I enter the "." there is no reference to either "Workdays" or
"Networkdays" from the object browser.

When I run the macro, it errors out with Run-time error 438 - Object does
not support this property or method.

Does anyone know why this is happening, and what I can do to correct this?

Thank-you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default how to use workdays or networkdays in VBA

On Wed, 22 Mar 2006 19:26:31 -0800, ABG wrote:

I have a macro that needs either Workdays or networkdays to determine the
number of workdays in a month.
I have installed the "Analysis Tool Pack" and "Analysis Took Pack - VBA"
into Excel.
I am trying to use "application.worksheetfunction.networkdays(... ..)"
however after I enter the "." there is no reference to either "Workdays" or
"Networkdays" from the object browser.

When I run the macro, it errors out with Run-time error 438 - Object does
not support this property or method.

Does anyone know why this is happening, and what I can do to correct this?

Thank-you


In the VB editor, Tools/References atpvbaen.xls

Then in your macro, just use:

Var = workdays(dt,num)


--ron
  #3   Report Post  
Posted to microsoft.public.excel.programming
ABG ABG is offline
external usenet poster
 
Posts: 8
Default how to use workdays or networkdays in VBA

THANK-YOU Ron.

I forgot the aptvbaen.xls!

I guess this is where I slap myself on the back of the head and chalk it up
to an ID 10 T error! (I get a lot of those!)


"Ron Rosenfeld" wrote:

On Wed, 22 Mar 2006 19:26:31 -0800, ABG wrote:

I have a macro that needs either Workdays or networkdays to determine the
number of workdays in a month.
I have installed the "Analysis Tool Pack" and "Analysis Took Pack - VBA"
into Excel.
I am trying to use "application.worksheetfunction.networkdays(... ..)"
however after I enter the "." there is no reference to either "Workdays" or
"Networkdays" from the object browser.

When I run the macro, it errors out with Run-time error 438 - Object does
not support this property or method.

Does anyone know why this is happening, and what I can do to correct this?

Thank-you


In the VB editor, Tools/References atpvbaen.xls

Then in your macro, just use:

Var = workdays(dt,num)


--ron

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default how to use workdays or networkdays in VBA

On Wed, 22 Mar 2006 20:01:32 -0800, ABG wrote:

THANK-YOU Ron.

I forgot the aptvbaen.xls!

I guess this is where I slap myself on the back of the head and chalk it up
to an ID 10 T error! (I get a lot of those!)


I find I get more of those the older I get :-))

Glad to help
--ron
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
Sum Workdays Frank Excel Worksheet Functions 3 January 25th 10 01:00 PM
Workdays Andrew Excel Worksheet Functions 3 September 9th 08 03:48 PM
Workdays/Networkdays #Name? Error K Excel Worksheet Functions 12 July 16th 08 07:13 PM
Workdays Alpur Excel Discussion (Misc queries) 3 November 3rd 05 04:00 PM
Workdays Steph[_6_] Excel Programming 2 October 24th 05 08:22 PM


All times are GMT +1. The time now is 06:19 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"