Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro for selection

Hi all,

I have a macro to make a selection in a List with Variable Values from an Inputbox:

 

sub Modul
Mstart = ActiveDocument.Variables("Modulvon").GetContent.String
Mlast = ActiveDocument.Variables("Modulbis").GetContent.String
MtoSelect = ">=" & Mstart & "<=" & Mlast
ActiveDocument.Fields("MODUL").Select MtoSelect
end sub

sub BI
Bstart = ActiveDocument.Variables("BIvon").GetContent.String
Blast = ActiveDocument.Variables("BIbis").GetContent.String
BtoSelect = ">=" & Bstart & "<=" & Blast
ActiveDocument.Fields("BI").Select BtoSelect
end sub


sub Datum
Dstart = ActiveDocument.Variables("=DATE(vDateStart,'DD.MM.YYYY')").GetContent.String
Dlast = ActiveDocument.Variables("=DATE(vDateEnd,'DD.MM.YYYY')").GetContent.String
DtoSelect = ">=" & Dstart & "<=" & Dlast
ActiveDocument.Fields("=DATE(DATUM,'DD.MM.YYYY')").Select DtoSelect
end sub

 

sub KmStand

Kstart = ActiveDocument.Variables("KMStandvon").GetContent.String

Klast = ActiveDocument.Variables("KMStandbis").GetContent.String

KtoSelect = ">=" & Kstart & "<=" & Klast

ActiveDocument.Fields("KMSTAND").Select KtoSelect

end sub

now I have several Problems.

1) I can't select Date values if I run the macro the macro-script opens and nothing else happen

     (the column "DATUM" has the format with time, but the in the calendarboxes I only want to select in Date and not with date and time)

2) if I reset the inputboxes with an box reset Variable and put the Values to min and max from the Datas I get the min and the max from the selected list and not from the whole data list. Is it possible to get it from the whole list and ignore current selections?

3) if I select BI and than Modul everything is right, but if I want to select KMSTAND too, the other two selections disappear. But otherwise if I select BI and then KMSTAND everything is ok, but if I select MODUL, KMSTAND disappear. I don't see a difference in the script, so what can be the problem?

Thanks a lot for help !

0 Replies