Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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

3 Replies
jerrysvensson
Partner - Specialist II
Partner - Specialist II

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

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

marcus_sommer

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

- Marcus

flipside
Partner - Specialist II
Partner - Specialist II

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

becomes

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.

flipside