+ Reply to Thread
Results 1 to 2 of 2

to use workday function in excel vba code

  1. #1
    Registered User
    Join Date
    10-29-2005
    Posts
    12

    Exclamation to use workday function in excel vba code

    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.

  2. #2
    Ron Rosenfeld
    Guest

    Re: to use workday function in excel vba code

    On Thu, 10 Nov 2005 05:28:29 -0600, sjayar
    <sjayar.1ya3ny_1131622201.2402@excelforum-nospam.com> wrote:

    >
    >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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1