workday date function

S

sjayar

Hi All,
I have a worksheet with date time picker,2 textbox and a command
button.

on click of this button textbox2 should get filled with date

like:......................
Assume
1. cell A1 contains date(10/11/2005)
2. B1 contains some numberic value(2)
3. C1 = workday(A1, B1) will be give serial number which after
formatting to date type gives me 12/11/2005


is there a way to implement the same steps in my macro.
if i use worday() i get sub or function not defined

Plz let me know how to do this.
 
N

Nick Hodge

sjayar

You will need to install and enable the analysis toolpak FOR VBA as the
function WORKDAY is part of the standard analysis toolpak

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(e-mail address removed)
 
B

Bob Phillips

Sounds like the standard Analysis Toolpak to me, not the VBA flavour.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
N

Nick Hodge

Bob

Not sure if I misunderstand here, but is the OP not wanting the function to
work in code. He can get it working on a worksheet but it throws an error
when trying it in code?

Nick

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top