Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
shumailh
Creator III
Creator 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

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
shumailh
Creator III
Creator III
Author

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