H
Hovda
Hi Experts.
Still getting this mismatch error in my msp vba macro.
the problem is:
i want to use the task calendar in the dateDifference function but ge
an error. (Type Mismatch error )
For testing im using "Night Shift"
when using:
MsgBox (Application.DateDifference("10.07.04", "12.07.04", "Nigh
shift"))
this return an type mismatch error.
ive checked the dates and they are okey.
ive found out that it may have something to with the datatype of th
calendar. when i use "24 Hours" (String) as calendar i get this error
but using ActiveProject.Calendar (Object/Calendar) its works fine.
so then i tought okey.... lets use:
dim Activity as Task
MsgBox (Application.DateDifference("10.07.04", "12.07.04"
Activity.Calendar))
but the sad thing is then that Activity.Calendar is a String. So thi
dosent work.
So, what to do? something to change in settings?
it most be someway to refer to the TaskCalendar as an object?
Thank you all for reading this and trying to help me!
- Bjorn, Norwa
Still getting this mismatch error in my msp vba macro.
the problem is:
i want to use the task calendar in the dateDifference function but ge
an error. (Type Mismatch error )
For testing im using "Night Shift"
when using:
MsgBox (Application.DateDifference("10.07.04", "12.07.04", "Nigh
shift"))
this return an type mismatch error.
ive checked the dates and they are okey.
ive found out that it may have something to with the datatype of th
calendar. when i use "24 Hours" (String) as calendar i get this error
but using ActiveProject.Calendar (Object/Calendar) its works fine.
so then i tought okey.... lets use:
dim Activity as Task
MsgBox (Application.DateDifference("10.07.04", "12.07.04"
Activity.Calendar))
but the sad thing is then that Activity.Calendar is a String. So thi
dosent work.
So, what to do? something to change in settings?
it most be someway to refer to the TaskCalendar as an object?
Thank you all for reading this and trying to help me!
- Bjorn, Norwa