Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

Qlikview Macro Not Working

Hi Guys,

I am using below macro but its nor working.  Working on Local Desktop but not in webview as well as Access Point.

Using the IE Plugin Client.

Sub Test 


  Set XLApp = CreateObject("Excel.Application") 

  Set XLDoc = XLApp.Workbooks.Add 

  Set XLSheet = XLDoc.Worksheets(1) 


  Const xlCenter = -4108

  Const xTop = -4160

  Const xlContinuous = 1

  Const xlPie = 5

  Const xlBar = 3

  Const xlLayout = 7

  'Const xlColumnClustered = 5




  'XLApp.ActiveWindow.DisplayGridlines = False 





  ActiveDocument.Variables("vTabName").SetContent "PII", True

  ActiveDocument.Variables("vSubTabName").SetContent "NonListMatch", True


  XLApp.ActiveSheet.Name = "NLM Additional Details"

  XLApp.ActiveWindow.DisplayGridlines = False


  ActiveDocument.GetSheetObject("CH52").CopyTableToClipboard TRUE

  XLApp.ActiveSheet.PasteSpecial Paste = xlPasteValues

  XLApp.Selection.Borders.linestyle = xlContinuous


  XLApp.Range("A46:C46").Interior.Color = RGB(217,217,217)

  XLApp.Range("A46:C46").Font.Bold = TRUE


end sub 



2 Replies
Valued Contributor

Re: Qlikview Macro Not Working

Have you set up macro security correctly on the document?

Also, on the ie plugin, press Ctrl+Shift+M to make sure macros are enabled.


Svebeck Consulting AB
Not applicable

Re: Qlikview Macro Not Working

Yes I have enabled the macros and even surity to Allow System Access.

I think its failing at CopyToClipBoard somewhere. Because when I run webview for the first time it opens excel but not able to paste data and if i again press the button (2nd time) to run macro it does not open the excel. So I have to turn off webview and need to turn again on and then click on the button and then it opens excel without data.