Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to Actions Issue (Last 12 Months select )

We are in process of migrating QV report from Version 8.2 to 9. When we move report to version 9, we want to eliminate macros as much as possible. So far I am able to produce desired behavior using "Actions" and removing macros. However I am having trouble in converting following macro to actions in version 9.

sub Lock

set y=ActiveDocument.GetField("Date")

y.TOPSelect "Date",12

end sub

How do I make sure search string always selects last 12 months?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Here's an example using Actions instead of a macro to select the last 12 months from a YearMonth field.

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Here's an example using Actions instead of a macro to select the last 12 months from a YearMonth field.

Not applicable
Author

How do I select the last twelve months.

My formula is:

='>' & date(addmonths((date(Today(),'YYYY')&MaandMin1-1),-12), 'YYYYMM')


He selects the last month when I use the formula

=(date(Today(),'YYYY')&MaandMin1-1)

But he was nothing when I select the entire formula

Who can help me with this?

Not applicable
Author

I am using following formula and it is working fine for me. Can you try it ?

= '>' & MonthStart((Today()),-12)



Not applicable
Author

don't work by me

Not applicable
Author

=(date(Today(),'YYYY')&MaandMin1-1)

This one works, but i want the past 12 months