Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Removal of "VB script" from the title of a message box

Hello Everybody,

I have written the below VB Script(Macro ) to copy the value into clip board and while selecting more than one BA Names it will gi

I have also given a title for it. This is working fine in my machine.

But while accessing from access point I am getting the title as 'VB Script: Copy To Clipboard '

Script:

Sub Copy

SET fx = ActiveDocument.Fields("BA Name|BA ID|Accounting/Non Accounting")
SET fxV = fx.GetSelectedValues

if (fxV.Count) = 0 or (fxV.Count) > 1 then

'msgbox ("Please Select Only One Business Associate/Client")
strMessage = "Please select only one Business Associate/Client"
Msgbox strMessage, 0, "Copy To Clipboard"
else
ActiveDocument.GetSheetObject("LB136").CopyValuesToClipboard
end if

End Sub

Please advise

Thanks In Advance

Sonali

4 Replies
kuba_michalik
Partner - Specialist
Partner - Specialist

My guess would be it's dependent on QV version, I get the "VBScript:" even when testing a local solution.

Maybe consider using native QV popup (ActiveDocument.ShowPopup) instead of msgbox, you'll be able to use a timeout as well. Much spiffier Although yeah, try to avoid macros, especially if you are targeting anything but desktop/plugin. Neither msgbox nor QV popup will work in webview.

Bill_Britt
Former Employee
Former Employee

I wish I still had the link, but I did some research on this a couple of years back. According to what I found there is no way to remove it and it is by design from Microsoft. It has something to differentiate it from standard system dialogs.”

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
flipside
Partner - Specialist II
Partner - Specialist II

What you CAN do is set up the error message as a text box and display it conditionally using a variable when needed.

For example, set up a variable called ShowError with a value of 1. Then create your error message in a text box (set the Layer on the Layout tab to highest possible value - 127?) and conditionally show (on Layout tab) ShowError=1. In the same text box set up an action (Add > External > Set Variable) which sets variable ShowError to 0. This will make your error message go away when clicking anywhere in the textbox.

Now in your VBScript, instead of invoking the MsgBox, set the variable to 1 to initiate your text box in the macro.

set v = ActiveDocument.GetVariable("ShowError")
v.SetContent "1",true

The only downside is you need to have the text box on every tab where it is needed, but it's just copy/paste.

flipside