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

Qlikview 11 Macro to select multiple values not working

I am using the below Macro

sub Test_Customer
call Test("CustNo","Please type in CustomerNo(one by one):")
end sub

sub Test(byval vFeld,byval Meldung)
Feld=vFeld
Variable="vAuswahl" & vFeld

ActiveDocument.CreateVariable Variable

set v = ActiveDocument.Variables(Variable)
Auswahl=v.GetContent.String

xt = ActiveDocument.GetApplication.InputBoxEx(Meldung,Auswahl)

set v = ActiveDocument.Variables(Variable)
v.SetContent xt,true

activedocument.fields(Feld).clear

A=split(xt,chr(10))
set f = ActiveDocument.Fields(Feld)
set fv = f.GetNoValues 'empty array

for i = lbound(A) to ubound(A)
fv.Add
'if isnumeric(A(i)) then
' fv(i).Number = A(i)
' fv(i).IsNumeric = true
' else
fv(i).Text = A(i)
fv(i).IsNumeric = false
'end if
next

f.SelectValues fv

end sub

I have button - Run Macro Calling the Test_Customer.

It worked before migration -I have provided value like

1111

1234

6754

8900

After migration it is taking values

1111123467548900

Please advise if you have any details.

Thank you in advance for your help.

2 Replies
marcus_sommer

It looked that your split() delimiter of chr(10) don't work anymore. You could try it with chr(13) or the combination from them: chr(13) & chr(10) or another delimiter like: "###".

- Marcus

Not applicable
Author

Thank you very much for your help - it is working.