
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot call Sub routine from the Module.
Here is the script in the module.
--------------------------------------------------------------------------------------
function NextContractDate(ContractLength,ContractStart)
f = 1
do while f
NextDate = DateAdd("m",ContractLength, ContractStart)
if NextDate < date() then
ContractStart = NextDate
f = 1
else
f = 0
end if
loop
NextContractDate = NextDate * 1
end function
sub C
msgbox NextContractDate(9, 40909)
end sub
function TestMe(a,b)
TestMe = a + b
end function
--------------------------------------------------------------------------------------
Here is the script in the Qlikview document.
Call C
I don't know the reason why I am unable to call sub C from the script. Could you please figure out this issue?
Thank you very much indeed.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot call Module Subs from script. The script Call statement calls script subs, not module subs.
You can use Module Functions in script like:
LOAD NextContractDate(ContractLength,ContractStart) as NextContract Date
...FROM xxx;
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error screen below was populated.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot call Module Subs from script. The script Call statement calls script subs, not module subs.
You can use Module Functions in script like:
LOAD NextContractDate(ContractLength,ContractStart) as NextContract Date
...FROM xxx;
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
oh. It's clear answer Rob.
Thank you for your answering.
