Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

shumailh
Contributor III

Type Mismatch Error on MonthEnd Function in Macro

I am using below macro and getting type mismatch error on MonthEnd Fucntion while executing macro on onSelect Field Event Below is a Macro.

sub Update_PrevMonth()

Set v = ActiveDocument.Variables("PrevMonth")

v.setcontent MonthName(MonthEnd(LoadDate_Active-Day(LoadDate_Active))), true

end sub

Can anyone please help?

Regards

Shumail Hussain

Reference :http://community.qlik.com/message/83724#83724

Tags (1)
2 Replies

Type Mismatch Error on MonthEnd Function in Macro

HI,

   This is because you are using Monthend() function which is not a valid vbscript function.

   This function is available in qlikview. And you can not use qlikview functions in Macros.

   Try some other logic.

Regards,

Kaushik Solanki

shumailh
Contributor III

Type Mismatch Error on MonthEnd Function in Macro

Thanks Man, That was a silly mistake.... now i need to go to some vbscript forum Smiley Sad to get the month end function as i am not good in programming stuff

Community Browser