C# Calendar

  • Thread starter MacKenzie Mickelsen
  • Start date
M

MacKenzie Mickelsen

Hello all

I am trying to set the a Calendar's Shift objects Start and Finish
properties. There is no SetField method to use for the Shift object. Is there
a way for me to do this?

Thanks
MacKenzie
 
J

Jan De Messemaeker

Hi,

Why use setfields?
I must have written 10K LOC and never ever used it.
The shift objects (Shift1 etc.) have a start and a finish property which are
read/write.
 
M

MacKenzie Mickelsen

Jan

What language did you use? When I try this in C# I get an error since the
property's type is Variant which isnt supported by C#.

Thanks
Kenzie
 
J

Jan De Messemaeker

Hi,

Sorry I use VBA and (wrongly, apparently) assumed you could use the whole
API in C++.
- Makes me wonder; C++ believers claim that VBA is a children's toy now here
it is more powerful? :)) -

OTOH I fail to see which property is variant.
Start and finish are normally date.

So looking at the example in the help:

With ActiveProject.Calendar.WeekDays(pjFriday)
.Shift1.Start = #8:00:00 AM#
.Shift1.Finish = #12:00:00 PM#
.Shift2.Clear
.Shift3.Clear
End With

Where's the problem?
 

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