to use workday function in excel vba code

S

sjayar

hi all,

is there a way to use wrokday function in my worksheet controls.?

i have a date time picker in my worksheet and a text box and a button.

on click of this button i should get next desired date.

like when i select a date from the calendar and click on button ther
is onclick function in my macro.

this onclick should calculate next desired date(assume if i choos
10/11/2005 and add 2 to this date i should get 12/11/2005)

i know how to use workday function using a cell reference
but................
i don't know how to put this into a vba code.
if i use workday("10/11/2005", 2) i get sub or function not found erro
message.


Please Please help me out to solve this problem
 
R

Ron Rosenfeld

hi all,

is there a way to use wrokday function in my worksheet controls.?

i have a date time picker in my worksheet and a text box and a button.

on click of this button i should get next desired date.

like when i select a date from the calendar and click on button there
is onclick function in my macro.

this onclick should calculate next desired date(assume if i choose
10/11/2005 and add 2 to this date i should get 12/11/2005)

i know how to use workday function using a cell reference.
but................
i don't know how to put this into a vba code.
if i use workday("10/11/2005", 2) i get sub or function not found error
message.


Please Please help me out to solve this problem.

On the top menu bar of the VB Editor, look at Tools/References and select
atpvbaen.xls

The Analysis Tool Pak functions, of which WORKDAY is one, will then be enabled
in your VBA code in that workbook.


--ron
 
Top