Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default NetWorkdays Not Recognized in 2007

I have the following code that I used in an Excel 2003 macro.

If NetWorkdays(Range("F38"), Range("G38"),
ThisWorkbook.Sheets(3).Range("A1:A" & HolCount)) 14 Then
ActiveSheet.CheckBoxes("Check box 27").Value = xlOn
Else
ActiveSheet.CheckBoxes("Check box 26").Value = xlOn
End If

I have converted the macro to Excel 2007 and, when I invoke the macro, I get
a compile error - sub or function not defined.
I have Analysis Tool-Pak VBA added in.
I have atpvbaen as a reference as well as Excel and Office Object Librairies.
What am I missing that is causing this problem?
--
Ken Hudson
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default NetWorkdays Not Recognized in 2007

The ATP has been integrated in Excel 2007, so try

If WorksheetFunction.NetWorkdays(Range("F38"), Range("G38"),
ThisWorkbook.Sheets(3).Range("A1:A" & HolCount)) 14 Then
ActiveSheet.CheckBoxes("Check box 27").Value = xlOn
Else
ActiveSheet.CheckBoxes("Check box 26").Value = xlOn
End If


--
__________________________________
HTH

Bob

"Ken Hudson" wrote in message
...
I have the following code that I used in an Excel 2003 macro.

If NetWorkdays(Range("F38"), Range("G38"),
ThisWorkbook.Sheets(3).Range("A1:A" & HolCount)) 14 Then
ActiveSheet.CheckBoxes("Check box 27").Value = xlOn
Else
ActiveSheet.CheckBoxes("Check box 26").Value = xlOn
End If

I have converted the macro to Excel 2007 and, when I invoke the macro, I
get
a compile error - sub or function not defined.
I have Analysis Tool-Pak VBA added in.
I have atpvbaen as a reference as well as Excel and Office Object
Librairies.
What am I missing that is causing this problem?
--
Ken Hudson



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default NetWorkdays Not Recognized in 2007

As usual, you have the answer.
Thanks Bob.
--
Ken Hudson


"Bob Phillips" wrote:

The ATP has been integrated in Excel 2007, so try

If WorksheetFunction.NetWorkdays(Range("F38"), Range("G38"),
ThisWorkbook.Sheets(3).Range("A1:A" & HolCount)) 14 Then
ActiveSheet.CheckBoxes("Check box 27").Value = xlOn
Else
ActiveSheet.CheckBoxes("Check box 26").Value = xlOn
End If


--
__________________________________
HTH

Bob

"Ken Hudson" wrote in message
...
I have the following code that I used in an Excel 2003 macro.

If NetWorkdays(Range("F38"), Range("G38"),
ThisWorkbook.Sheets(3).Range("A1:A" & HolCount)) 14 Then
ActiveSheet.CheckBoxes("Check box 27").Value = xlOn
Else
ActiveSheet.CheckBoxes("Check box 26").Value = xlOn
End If

I have converted the macro to Excel 2007 and, when I invoke the macro, I
get
a compile error - sub or function not defined.
I have Analysis Tool-Pak VBA added in.
I have atpvbaen as a reference as well as Excel and Office Object
Librairies.
What am I missing that is causing this problem?
--
Ken Hudson




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default NetWorkdays Not Recognized in 2007



"Ken Hudson" wrote:

As usual, you have the answer.
Thanks Bob.
--
Ken Hudson


"Bob Phillips" wrote:

The ATP has been integrated in Excel 2007, so try

If WorksheetFunction.NetWorkdays(Range("F38"), Range("G38"),
ThisWorkbook.Sheets(3).Range("A1:A" & HolCount)) 14 Then
ActiveSheet.CheckBoxes("Check box 27").Value = xlOn
Else
ActiveSheet.CheckBoxes("Check box 26").Value = xlOn
End If


--
__________________________________
HTH

Bob

"Ken Hudson" wrote in message
...
I have the following code that I used in an Excel 2003 macro.

If NetWorkdays(Range("F38"), Range("G38"),
ThisWorkbook.Sheets(3).Range("A1:A" & HolCount)) 14 Then
ActiveSheet.CheckBoxes("Check box 27").Value = xlOn
Else
ActiveSheet.CheckBoxes("Check box 26").Value = xlOn
End If

I have converted the macro to Excel 2007 and, when I invoke the macro, I
get
a compile error - sub or function not defined.
I have Analysis Tool-Pak VBA added in.
I have atpvbaen as a reference as well as Excel and Office Object
Librairies.
What am I missing that is causing this problem?
--
Ken Hudson




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default NetWorkdays Not Recognized in 2007

Hi Bob,

I was running through this conversation with KEn but still cant get to run
the networkdays function.

ElseIf LCase(Left(cbma, 3)) = "rdd" Then
RDDdate = TextToDate(.Range("R" & indx).Value)
diffdate = NetworkDays(curdate, RDDdate)

If diffdate RDDdur Then
.Range(sdate_col & indx).Value = "Forward RDD"
.Range(stocks_col & indx).Value = "No Action"
Else
.Range(sdate_col & indx).Value = ""
.Range(stocks_col & indx).Value = ""
End If
End If

Let me know any remedies you have in mind. Btw, i have added in Analysis
Tool-Pak VBA and used atpvbaen.xls as reference as well.

Thanks

Lyndon

"Ken Hudson" wrote:

As usual, you have the answer.
Thanks Bob.
--
Ken Hudson


"Bob Phillips" wrote:

The ATP has been integrated in Excel 2007, so try

If WorksheetFunction.NetWorkdays(Range("F38"), Range("G38"),
ThisWorkbook.Sheets(3).Range("A1:A" & HolCount)) 14 Then
ActiveSheet.CheckBoxes("Check box 27").Value = xlOn
Else
ActiveSheet.CheckBoxes("Check box 26").Value = xlOn
End If


--
__________________________________
HTH

Bob

"Ken Hudson" wrote in message
...
I have the following code that I used in an Excel 2003 macro.

If NetWorkdays(Range("F38"), Range("G38"),
ThisWorkbook.Sheets(3).Range("A1:A" & HolCount)) 14 Then
ActiveSheet.CheckBoxes("Check box 27").Value = xlOn
Else
ActiveSheet.CheckBoxes("Check box 26").Value = xlOn
End If

I have converted the macro to Excel 2007 and, when I invoke the macro, I
get
a compile error - sub or function not defined.
I have Analysis Tool-Pak VBA added in.
I have atpvbaen as a reference as well as Excel and Office Object
Librairies.
What am I missing that is causing this problem?
--
Ken Hudson




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
UDF Not recognized Rookie_User Excel Worksheet Functions 3 January 29th 10 10:16 PM
value not recognized as a formula Ron@Buy Excel Worksheet Functions 2 February 27th 09 06:36 PM
UserForm_Initialize is not recognized?? Sam Kuo[_3_] Excel Programming 15 August 4th 08 11:13 PM
UDF not recognized after conversion to 2007 ppsa Excel Programming 5 August 6th 07 07:22 PM
Add-In not Recognized naive14 Excel Programming 2 May 11th 07 09:10 PM


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