O
Office_Novice
Can this worksheet function be replicated in VBA? I would like to get the end
of any given month, Any Thoughts?
of any given month, Any Thoughts?
Richard Schollar said:Hi
Within the VBE go Tools>References and set a reference to atpvbaen.xls (the
Analysis Toolpak) and then you can use the functions it contains within your
code eg:
MsgBox Eomonth(Date,5)
Richard
Mike H said:I believe your method only works for E2007, for earlier
MsgBox Format([atpvbaen.xls].EoMonth(Now, 5), "DD/MM/YYYY")
Mike
Richard Schollar said:Hello Mike
What seems to be the problem?
Richard
Richard Schollar said:Worked for me in 2003 ;-)
--
Richard Schollar
Microsoft MVP - Excel
Mike H said:I believe your method only works for E2007, for earlier
MsgBox Format([atpvbaen.xls].EoMonth(Now, 5), "DD/MM/YYYY")
Mike
Richard Schollar said:Hello Mike
What seems to be the problem?
Richard
tested?
:
Hi
Within the VBE go Tools>References and set a reference to atpvbaen.xls
(the
Analysis Toolpak) and then you can use the functions it contains
within
your
code eg:
MsgBox Eomonth(Date,5)
Richard
message
Can this worksheet function be replicated in VBA? I would like to
get
the
end
of any given month, Any Thoughts?
Mike H said:well that's most odd, even with the reference set in VB and on the
worksheet
addins I can't do it. I'm puzzled
Richard Schollar said:Worked for me in 2003 ;-)
--
Richard Schollar
Microsoft MVP - Excel
Mike H said:I believe your method only works for E2007, for earlier
MsgBox Format([atpvbaen.xls].EoMonth(Now, 5), "DD/MM/YYYY")
Mike
:
Hello Mike
What seems to be the problem?
Richard
tested?
:
Hi
Within the VBE go Tools>References and set a reference to
atpvbaen.xls
(the
Analysis Toolpak) and then you can use the functions it contains
within
your
code eg:
MsgBox Eomonth(Date,5)
Richard
message
Can this worksheet function be replicated in VBA? I would like to
get
the
end
of any given month, Any Thoughts?
Richard Schollar said:Mike
Probably unlikely I realise but you don't have another UDF function in an
open workbook called Eomonth do you?
--
Richard Schollar
Microsoft MVP - Excel
Mike H said:well that's most odd, even with the reference set in VB and on the
worksheet
addins I can't do it. I'm puzzled
Richard Schollar said:Worked for me in 2003 ;-)
--
Richard Schollar
Microsoft MVP - Excel
I believe your method only works for E2007, for earlier
MsgBox Format([atpvbaen.xls].EoMonth(Now, 5), "DD/MM/YYYY")
Mike
:
Hello Mike
What seems to be the problem?
Richard
tested?
:
Hi
Within the VBE go Tools>References and set a reference to
atpvbaen.xls
(the
Analysis Toolpak) and then you can use the functions it contains
within
your
code eg:
MsgBox Eomonth(Date,5)
Richard
message
Can this worksheet function be replicated in VBA? I would like to
get
the
end
of any given month, Any Thoughts?
Mike H said:No,
I've been delving deeper and I'm still struggling to understand why. I can
call all the functions using
MsgBox Format([atpvbaen.xls]....etc
But not with the reference set
Mike
Richard Schollar said:Mike
Probably unlikely I realise but you don't have another UDF function in an
open workbook called Eomonth do you?
--
Richard Schollar
Microsoft MVP - Excel
Mike H said:well that's most odd, even with the reference set in VB and on the
worksheet
addins I can't do it. I'm puzzled
:
Worked for me in 2003 ;-)
--
Richard Schollar
Microsoft MVP - Excel
I believe your method only works for E2007, for earlier
MsgBox Format([atpvbaen.xls].EoMonth(Now, 5), "DD/MM/YYYY")
Mike
:
Hello Mike
What seems to be the problem?
Richard
tested?
:
Hi
Within the VBE go Tools>References and set a reference to
atpvbaen.xls
(the
Analysis Toolpak) and then you can use the functions it contains
within
your
code eg:
MsgBox Eomonth(Date,5)
Richard
in
message
Can this worksheet function be replicated in VBA? I would like
to
get
the
end
of any given month, Any Thoughts?