Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Which Excel references used for Workday Formula in MS Excel 2003?

when we used the workday formula in the VBA macro, some users facing problem
in workday calculation (MS EXCEL 2003) and they get #VALUE!".

Can you please help me which reference or Library is missing?

We have already activated the 2 VBA toolpak
(Analysis Toolpak & Analysis Toolpak - VBA)

We also have the VBE6.DLL file in the following file path
C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\

We also have the Excel.exe file in the following file path
C:\Program Files\Microsoft Office\OFFICE 11\

We also have the stdole.tlb & FM20.dll file in the following file path
C:\Windows\System 32\

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Which Excel references used for Workday Formula in MS Excel 2003?

Post the offending line(s) of code

"T. Johnson" wrote:

when we used the workday formula in the VBA macro, some users facing problem
in workday calculation (MS EXCEL 2003) and they get #VALUE!".

Can you please help me which reference or Library is missing?

We have already activated the 2 VBA toolpak
(Analysis Toolpak & Analysis Toolpak - VBA)

We also have the VBE6.DLL file in the following file path
C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\

We also have the Excel.exe file in the following file path
C:\Program Files\Microsoft Office\OFFICE 11\

We also have the stdole.tlb & FM20.dll file in the following file path
C:\Windows\System 32\

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Which Excel references used for Workday Formula in MS Excel 20


You need to add a reference to atpvbaen.xls. The simplest way to do this is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Which Excel references used for Workday Formula in MS Excel 20

I should mention this can also be done via code. An example I've used:

calc_dt = Application.Run("ATPVBAEN.XLA!WorkDay", Now, -1,
Sheets("Procedures").Range("P1:P57"))

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Which Excel references used for Workday Formula in MS Excel 20

No addin or additional reference is required. The Weekday function is
built-in to all versions of Excel. It is also built-in to VBA, though it
looks like the OP is only using VBA to write a cell formula that includes
the Weekday function.

Regards,
Peter T


"arjen van..." wrote in message
...

You need to add a reference to atpvbaen.xls. The simplest way to do this
is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Which Excel references used for Workday Formula in MS Excel 20

You read the post too quickly Peter... the OP's post said he was trying to
use the WORKDAY function from the Analysis ToolPak, not Excel's built-in
WEEKDAY function.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
No addin or additional reference is required. The Weekday function is
built-in to all versions of Excel. It is also built-in to VBA, though it
looks like the OP is only using VBA to write a cell formula that includes
the Weekday function.

Regards,
Peter T


"arjen van..." wrote in message
...

You need to add a reference to atpvbaen.xls. The simplest way to do this
is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Which Excel references used for Workday Formula in MS Excel 20

You read the post too quickly Peter...

Let me bounce that back to you <g

The OP merely mentioned the ATP adidns are installed and some other
references. A "missing" ref of any type could impact on the function not
working if called in VBA (DateTime & Strings functions are particularly
sensitive to missing ref's). However the #Value! error suggests he is using
it in a cell formula, or conceivably but unlikely in VBA as a
"Worksheetfunction".

Regards,
Peter T


"Rick Rothstein" wrote in message
...
You read the post too quickly Peter... the OP's post said he was trying to
use the WORKDAY function from the Analysis ToolPak, not Excel's built-in
WEEKDAY function.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
No addin or additional reference is required. The Weekday function is
built-in to all versions of Excel. It is also built-in to VBA, though it
looks like the OP is only using VBA to write a cell formula that includes
the Weekday function.

Regards,
Peter T


"arjen van..." wrote in message
...

You need to add a reference to atpvbaen.xls. The simplest way to do this
is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.






  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Which Excel references used for Workday Formula in MS Excel 20

Oh dear, Let me retract that !!!

Indeed, I misread Workday as Weekday - sorry!

Regards,
Peter T



"Peter T" <peter_t@discussions wrote in message
...
You read the post too quickly Peter...


Let me bounce that back to you <g

The OP merely mentioned the ATP adidns are installed and some other
references. A "missing" ref of any type could impact on the function not
working if called in VBA (DateTime & Strings functions are particularly
sensitive to missing ref's). However the #Value! error suggests he is
using it in a cell formula, or conceivably but unlikely in VBA as a
"Worksheetfunction".

Regards,
Peter T


"Rick Rothstein" wrote in message
...
You read the post too quickly Peter... the OP's post said he was trying
to use the WORKDAY function from the Analysis ToolPak, not Excel's
built-in WEEKDAY function.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
No addin or additional reference is required. The Weekday function is
built-in to all versions of Excel. It is also built-in to VBA, though it
looks like the OP is only using VBA to write a cell formula that
includes the Weekday function.

Regards,
Peter T


"arjen van..." wrote in message
...

You need to add a reference to atpvbaen.xls. The simplest way to do
this is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.









  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Which Excel references used for Workday Formula in MS Excel 20

There is no question that the OP's question is unclear... his opening
paragraph where he mentions "macro" and "#VALUE!" error is an example of
that, which is why I asked him to post the code that is causing his troubles
in the hopes of narrowing down his real problem. However, my comment to you
had to do with your talking about the WEEKDAY function rather than the
WORKDAY function he specified he was using. Or am I simply missing something
relevant in your having done that.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
You read the post too quickly Peter...


Let me bounce that back to you <g

The OP merely mentioned the ATP adidns are installed and some other
references. A "missing" ref of any type could impact on the function not
working if called in VBA (DateTime & Strings functions are particularly
sensitive to missing ref's). However the #Value! error suggests he is
using it in a cell formula, or conceivably but unlikely in VBA as a
"Worksheetfunction".

Regards,
Peter T


"Rick Rothstein" wrote in message
...
You read the post too quickly Peter... the OP's post said he was trying
to use the WORKDAY function from the Analysis ToolPak, not Excel's
built-in WEEKDAY function.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
No addin or additional reference is required. The Weekday function is
built-in to all versions of Excel. It is also built-in to VBA, though it
looks like the OP is only using VBA to write a cell formula that
includes the Weekday function.

Regards,
Peter T


"arjen van..." wrote in message
...

You need to add a reference to atpvbaen.xls. The simplest way to do
this is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.






  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Which Excel references used for Workday Formula in MS Excel 20

<g No problem... and you can ignore my 'what amounted to a "huh?" message'
that I just sent in response to your previous posting... these messages
appear to have crossed each other in the ether.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
Oh dear, Let me retract that !!!

Indeed, I misread Workday as Weekday - sorry!

Regards,
Peter T



"Peter T" <peter_t@discussions wrote in message
...
You read the post too quickly Peter...


Let me bounce that back to you <g

The OP merely mentioned the ATP adidns are installed and some other
references. A "missing" ref of any type could impact on the function not
working if called in VBA (DateTime & Strings functions are particularly
sensitive to missing ref's). However the #Value! error suggests he is
using it in a cell formula, or conceivably but unlikely in VBA as a
"Worksheetfunction".

Regards,
Peter T


"Rick Rothstein" wrote in message
...
You read the post too quickly Peter... the OP's post said he was trying
to use the WORKDAY function from the Analysis ToolPak, not Excel's
built-in WEEKDAY function.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
No addin or additional reference is required. The Weekday function is
built-in to all versions of Excel. It is also built-in to VBA, though
it looks like the OP is only using VBA to write a cell formula that
includes the Weekday function.

Regards,
Peter T


"arjen van..." wrote in message
...

You need to add a reference to atpvbaen.xls. The simplest way to do
this is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.








  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Which Excel references used for Workday Formula in MS Excel 20

Lucky I got in with my retraction just in time!

Irrespective of my failure to read workday/weekday the diagnosis remains the
same. The #Value! error suggests all is working fine, just invalid
argument(s)

Regards,
Peter T

"Rick Rothstein" wrote in message
...
<g No problem... and you can ignore my 'what amounted to a "huh?"
message' that I just sent in response to your previous posting... these
messages appear to have crossed each other in the ether.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
Oh dear, Let me retract that !!!

Indeed, I misread Workday as Weekday - sorry!

Regards,
Peter T



"Peter T" <peter_t@discussions wrote in message
...
You read the post too quickly Peter...

Let me bounce that back to you <g

The OP merely mentioned the ATP adidns are installed and some other
references. A "missing" ref of any type could impact on the function
not working if called in VBA (DateTime & Strings functions are
particularly sensitive to missing ref's). However the #Value! error
suggests he is using it in a cell formula, or conceivably but unlikely
in VBA as a "Worksheetfunction".

Regards,
Peter T


"Rick Rothstein" wrote in message
...
You read the post too quickly Peter... the OP's post said he was trying
to use the WORKDAY function from the Analysis ToolPak, not Excel's
built-in WEEKDAY function.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
No addin or additional reference is required. The Weekday function is
built-in to all versions of Excel. It is also built-in to VBA, though
it looks like the OP is only using VBA to write a cell formula that
includes the Weekday function.

Regards,
Peter T


"arjen van..." wrote in message
...

You need to add a reference to atpvbaen.xls. The simplest way to do
this is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.










  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Which Excel references used for Workday Formula in MS Excel 20

Hello All,
Thanks for the reply.
Here is the codings...
FD declared as 'date' and
cell - H2 refers 7/12/2009 and cell - P2 refers 4

j = 2
k = 24
FD = Sheet1.Cells(8, k)
Sheet1.Cells(6, 47) = "=WORKDAY(H" & j & ",P" & j & ")"
If FD < Sheet1.Cells(6, 47) Then
Sheet1.Cells(j, k).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ColorIndex = 16
End With
End If

Kind regards
Johnson



"Rick Rothstein" wrote:

There is no question that the OP's question is unclear... his opening
paragraph where he mentions "macro" and "#VALUE!" error is an example of
that, which is why I asked him to post the code that is causing his troubles
in the hopes of narrowing down his real problem. However, my comment to you
had to do with your talking about the WEEKDAY function rather than the
WORKDAY function he specified he was using. Or am I simply missing something
relevant in your having done that.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
You read the post too quickly Peter...


Let me bounce that back to you <g

The OP merely mentioned the ATP adidns are installed and some other
references. A "missing" ref of any type could impact on the function not
working if called in VBA (DateTime & Strings functions are particularly
sensitive to missing ref's). However the #Value! error suggests he is
using it in a cell formula, or conceivably but unlikely in VBA as a
"Worksheetfunction".

Regards,
Peter T


"Rick Rothstein" wrote in message
...
You read the post too quickly Peter... the OP's post said he was trying
to use the WORKDAY function from the Analysis ToolPak, not Excel's
built-in WEEKDAY function.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
No addin or additional reference is required. The Weekday function is
built-in to all versions of Excel. It is also built-in to VBA, though it
looks like the OP is only using VBA to write a cell formula that
includes the Weekday function.

Regards,
Peter T


"arjen van..." wrote in message
...

You need to add a reference to atpvbaen.xls. The simplest way to do
this is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.







  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Which Excel references used for Workday Formula in MS Excel 20

Sheet1.Cells(6, 47) = "=WORKDAY(H" & j & ",P" & j & ")"

For the above line of code, I would think you should be assigning that text
string to the Formula property of the cell...

Sheet1.Cells(6, 47).Formula = "=WORKDAY(H" & j & ",P" & j & ")"

--
Rick (MVP - Excel)


"T. Johnson" wrote in message
...
Hello All,
Thanks for the reply.
Here is the codings...
FD declared as 'date' and
cell - H2 refers 7/12/2009 and cell - P2 refers 4

j = 2
k = 24
FD = Sheet1.Cells(8, k)
Sheet1.Cells(6, 47) = "=WORKDAY(H" & j & ",P" & j & ")"
If FD < Sheet1.Cells(6, 47) Then
Sheet1.Cells(j, k).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ColorIndex = 16
End With
End If

Kind regards
Johnson



"Rick Rothstein" wrote:

There is no question that the OP's question is unclear... his opening
paragraph where he mentions "macro" and "#VALUE!" error is an example of
that, which is why I asked him to post the code that is causing his
troubles
in the hopes of narrowing down his real problem. However, my comment to
you
had to do with your talking about the WEEKDAY function rather than the
WORKDAY function he specified he was using. Or am I simply missing
something
relevant in your having done that.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
You read the post too quickly Peter...

Let me bounce that back to you <g

The OP merely mentioned the ATP adidns are installed and some other
references. A "missing" ref of any type could impact on the function
not
working if called in VBA (DateTime & Strings functions are particularly
sensitive to missing ref's). However the #Value! error suggests he is
using it in a cell formula, or conceivably but unlikely in VBA as a
"Worksheetfunction".

Regards,
Peter T


"Rick Rothstein" wrote in message
...
You read the post too quickly Peter... the OP's post said he was
trying
to use the WORKDAY function from the Analysis ToolPak, not Excel's
built-in WEEKDAY function.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
No addin or additional reference is required. The Weekday function is
built-in to all versions of Excel. It is also built-in to VBA, though
it
looks like the OP is only using VBA to write a cell formula that
includes the Weekday function.

Regards,
Peter T


"arjen van..." wrote in message
...

You need to add a reference to atpvbaen.xls. The simplest way to do
this is
in Visual Basic editor. Tools References
Look for atpvbaen.xls and put a checkmark beside it.








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
Excel 2003 cell references - 32 refs - no more highlighting? TimK Excel Discussion (Misc queries) 4 June 30th 09 08:16 PM
Deleting MS JET OLE DB references in an Excel 2003 file dannyrblock Excel Discussion (Misc queries) 1 June 25th 08 06:50 PM
Excel 2003- multiple references Christine Thackeray Excel Discussion (Misc queries) 0 September 11th 07 05:56 PM
WORKDAY formula in excel AMHud Excel Worksheet Functions 2 December 14th 05 08:04 PM
Pivot tables Excel 2003 absolute references Poj Excel Discussion (Misc queries) 2 January 25th 05 12:57 PM


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