Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
priyankashrivas
Contributor II
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.

Labels (8)
2 Replies
anushree1
Specialist II
Specialist II

why don't you trying achieving it through actions

 

Brett_Bleess
Former Employee
Former Employee

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 do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.