Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm experiencing a problem with the OnActivate trigger on a sheet.
What I want to do is:
1. "select in field" action
2. run a macro which clears some fields (one of them being "StartDate_Year")
3. run another macro (clears some other fields)
4. "select in field" action --> sets a value in field "StartDate_Year"
But, when I switch to the sheet, action #4 is not executed
However, when I replace actions #2 and #3 by a sequence of "Clear field" actions, everything works just fine, so the problem is not in action #4.
The reason I want to use a macro, is so I can reuse this over multiple sheets.
Content of the macro is very simple:
Function ClearFields_StartDate
ActiveDocument.Fields("StartDate_YearMonth").Clear
ActiveDocument.Fields("StartDate_Dt").Clear
ActiveDocument.Fields("StartDate_Day").Clear
ActiveDocument.Fields("StartDate_Month").Clear
ActiveDocument.Fields("StartDate_MonthShort_NL").Clear
ActiveDocument.Fields("StartDate_MonthShort_FR").Clear
ActiveDocument.Fields("StartDate_MonthName_NL").Clear
ActiveDocument.Fields("StartDate_MonthName_FR").Clear
ActiveDocument.Fields("StartDate_YearMonth_NL").Clear
ActiveDocument.Fields("StartDate_YearMonth_FR").Clear
ActiveDocument.Fields("StartDate_Year").Clear
End Function
(second macro is identical - with end dates)
If I comment out the last line (clearing the "StartDate_Year" field), everything also works like a charm.
So I'm having the idea that Qlikview is not executing the trigger actions in the correct order?
Has someone else experienced this problem?
I am running QV10 SR1.
thanks,
Nico
What happens if you move the line toward the top?