Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Erlang C Macro / Function / VB

Hey All,

First of all I want to admit that I have no idea about VB codes...

Now coming to the point --- I have a VB code which basically creates functions of erlangb and erlangc in excel.

These functions are used to forecast the call volume, utilization and required manpower in contact centers.

As I stated I have no "idea" of VB codes so I simply copied and pasted the VB code(in attachment) and tried to become a "hero" . But it is giving me error i.e. Marco parse failed. Functionality was lost.

However the same VB code is working fine in Excel

It will be great if someone could help me in understand what am I doing wrong and how to make this work.

Thanks in advance!!!

Nitesh Srivastava

Tags (3)
3 Replies

Re: Erlang C Macro / Function / VB

vbscript (QlikView) is unfortunately not the same as VBA (Excel).

For instance "On Error GoTo ASAError" does not work in vbscript.

MVP & Luminary
MVP & Luminary

Re: Erlang C Macro / Function / VB

You will need to translate this code but maybe not to vbs - most of them should be work with inbuild qv-functionalities.

- Marcus

Valued Contributor II

Re: Erlang C Macro / Function / VB

Translating this to VBScript might not be as difficult as it first appears, although you will need to go through each function so will be time consuming if you're not fully up to speed with vbs.

For instance, in the function ErlangB, you need to remove all the 'AS' statements, so

Public Function ErlangB(Servers As Single, Intensity As Single) As Single


Public Function ErlangB(Servers, Intensity)

etc, and you will need to use different error handling along the lines of http:/ ss64.com/vb/onerror.html, but after that this function works.

Work with one function at a time, converting it until you get what you need then move onto the next. Or as Marcus says, recode the whole thing in Qlikview script.