Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
rcandeo
Creator III
Creator III

How can I make this select using VBScript?

I use a macro to get an inicial selection and it works fine.

My problem is that for an specific field I wannna make a selection for 3 diferent results and I am not getting the correct expression.

Here is my statement:

Sub SelecaoInicial

  ActiveDocument.GetField("Tipo_Faturamento").Select "Faturado"

  ActiveDocument.GetField("Family").Select "AA"

  ActiveDocument.GetField("Family").Select "BB"

  ActiveDocument.GetField("Family").Select "CC"

End Sub

I wanna select for Family these 3 options: AA, BB and CC, but it´s only selecting the last line - CC.

I´ve tried to put AND and OR, but all my atemptatives not worked.

Thank You

Robson

1 Solution

Accepted Solutions
Not applicable

Start with .Select then for following statements use .ToggleSelect. for example

Sub SelecaoInicial

  ActiveDocument.GetField("Tipo_Faturamento").Select "Faturado"

  ActiveDocument.GetField("Family").Select "AA"

  ActiveDocument.GetField("Family").ToggleSelect "BB"

  ActiveDocument.GetField("Family").ToggleSelect "CC"

End Sub

View solution in original post

2 Replies
Not applicable

Start with .Select then for following statements use .ToggleSelect. for example

Sub SelecaoInicial

  ActiveDocument.GetField("Tipo_Faturamento").Select "Faturado"

  ActiveDocument.GetField("Family").Select "AA"

  ActiveDocument.GetField("Family").ToggleSelect "BB"

  ActiveDocument.GetField("Family").ToggleSelect "CC"

End Sub

rcandeo
Creator III
Creator III
Author

Thank You very much