Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I copied the VB-Script and the load script from the manuell Section II Chapter 3 "call Macro function in script" in a new Qlikview File.
(german manuel Page 303)
And it doesn´t work.
The called VB-Functions returned NULL and the Inputbox won´t be shown.
With a "Test Sub" like
sub Test
msgbox VBin("Test")
end
and a Button assigned on this sub all works fine.
I use QlikView v9 SR4
best regards
Modul:
rem *************************************************
rem *********** VBSCRIPT AUS DEM MODUL *************
rem *************************************************
rem ************** Global Variablen *****************
dim flag
rem ************ Neue Skript-Funktionen *************
rem ************** Inputbox öffnen *****************
function VBin(prompt)
VBin = inputbox(prompt)
end function
rem ******** Globale Variable zurücksetzen ***********
function VBclearFlag()
flag = 0
end function
rem ************ Vergleich der Referenzen ************
function VBRelPos(Ref, Current)
if Ref = Current then
VBRelPos = "Reference"
flag = 1
elseif flag = 0 then
VBRelPos = "Before "&Ref&" in table"
else
VBRelPos="After "&Ref&" in table"
end if
end function
Script
// *************************************************
// ***************** LADE-SKRIPT *******************
// *************************************************
let MaxEinw=VBin('Max. Einwohnerzahl in Millionen:');
// Abfrage Limit
let RefLand=VBin('Referenz-Land:');
// Abfrage Referenz
let Dummy=VBclearFlag();
// Löscht Global Flag
Load Land,recno(),
Hauptstadt,
"Fläche (qkm)",
"Einwohner (Mio)",
VBRelPos('$(RefLand)',Land) as RelativePos
from länder1.csv
(ansi, txt, delimiter is ',', embedded labels)
where "Einwohner (Mio)" <= $(MaxEinw);
Ok,
If you still need to get it working, check this thread that addresses a similar issue.
Hope that helps.
Miguel
no idea?
Hi,
I'd rather use the following to populate a variable prompting the user
Let vGetInput = Input('Enter Text: ', 'Fill before continuing');
Hope that helps.
Miguel
I don´t need a input box. Its only a example.
I want to scan recursive a folder with subfolders and import all sheets with defined filenames. I have written a short vbscript that do this and return all filenames.
best regards
Ok,
If you still need to get it working, check this thread that addresses a similar issue.
Hope that helps.
Miguel
thank you very much, but it seems that's not my day
I use QlikView 9 and there is no function FileList()
Hi,
I'm using v9 SR4 and works just fine. Runs the folder and loads as expected. What error are you getting?
Regards,
Miguel
EDIT: I didn't want to remain in doubt. I've just checked the Reference Manual for version 9 and "filelist" is documented in the For Next loop, so it should work.
tadaaaa.....
filelist and dirlist are not listed in the functionlists or searchable in the help system.
The Descriptions are hide under "for each.... next"
The script is now working....
Thank you very much
best regards