Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

why error occur when clear all ?

Dear all,

It has "EN,CN,TW" for displaying multiple language , when I select one language , it's ok. And I want to display EN (AS default) language when I click Home-->Clear but It jump to edit macro module , I know the macro has bug but i don't know how to modify it (Qlikview is 9.0 beta version ), can someone help me ?

thanks in advance

1 Solution

Accepted Solutions
Not applicable
Author

To avoid any problem, you can set this field language so that always one value is selected ( field properties).

Rgds,

Sébastien

View solution in original post

6 Replies
Not applicable
Author

my vbs macro:

sub LangSetting
set f = ActiveDocument.Fields("langName").GetSelectedValues
if f.item(0).text = "CN" then
call ChangeCn
elseif f.item(0).text = "TW" then
call ChangeTw
else
call ChangeEn
end if
end sub

sub ChangeEn
ActiveDocument.Variables("lang").SetContent "EN",true
end sub

sub ChangeCn
ActiveDocument.Variables("lang").SetContent "CN",true
end sub

sub ChangeTw
ActiveDocument.Variables("lang").SetContent "TW",true
end sub

how can i modify it ?

Not applicable
Author

To avoid any problem, you can set this field language so that always one value is selected ( field properties).

Rgds,

Sébastien

Not applicable
Author

thanks, it is a good idea !

Not applicable
Author

Thank spastor, it work now !

thanomjit
Partner - Contributor II
Partner - Contributor II

sub LangSetting





On

..... error resume next '<--You can command line ----

set

f = ActiveDocument.Fields("langName").GetSelectedValues

sub





Not applicable
Author

Hi.

I had the same problem, but merely by adding "()" it worked to clear all without a default value.

From this :

selectedValue = ActiveDocument.fields("JF_Name").GetSelectedValues.Item(0).text

To this:

selectedValue = ActiveDocument.fields("JF_Name").GetSelectedValues().Item(0).text