Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
priyankashrivas
New Contributor II

Macro to open the hyperlink in chrome only

I want to open a hyperlink in chrome only.

 

please suggest a way to write macro.

I have tried below code of VBA, but it is not working.

 

Sub OpenMyURL()

ChromeLocation = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
MyURL = "https://www.google.com" 'URL that you would like to open; you may also use a variable for this, or a pointer to the location of the URL
Shell (ChromeLocation & " -url " & MyURL)

 

End Sub

 

Error is Type Mismatch - Shell.

 

Please suggest if there is any other way.

2 Replies
anushree1
Valued Contributor

Re: Macro to open the hyperlink in chrome only

why don't you trying achieving it through actions

 

Support
Support

Re: Macro to open the hyperlink in chrome only

Agree with the above contributor, if you are using a button object to launch the macro, use the Actions instead:

https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Button2.htm

There are many options from which to choose there and actions are a much better solution than macro, as macros will force a single-thread calculation condition and may cause other timing issues as well, actions are the best solution here. 

Regards,
Brett

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.