calendar input box

L

Lucas Soler

I have an input box that provides the user with a default date to enter. I'd
like to use the same feature that Project uses when updating the Status Date,
which is to use a calendar graphic to choose the date. Is there a way to use
a calendar input box?

What I'm using now:
'Set the status date
ActiveProject.StatusDate = InputBox("Enter Status Date.", _
"Period Start Date", Format$(ActiveProject.StatusDate, "Short Date"))
 
R

Rod Gill

HI,

Try adding a UserForm to your VBA proejct then:

click Tools, Additional Controls
Scroll down to Microsoft Date and Time Picker
Ok

Add the new control from teh Toolbox to your form. This additional control
may not be available in all verswions and I don't know whether it was
installed with Proejct or Visual Studio (which I also have installed on my
PC).

If this control is not available, then I don't think you can do what you
want.

--

Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Project VBA Book now in stock: visit www.projectvbabook.com
 
L

Lucas Soler

Rod,
Thanks for your help. I've created the form and it's listed there, but can
you help me access it from within the module? I've tried the following with
a debug error saying that the variable is faulty: "Form (ls_calendar)"

Cheers
 

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