Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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.Cells.Select 

  'XLApp.ActiveWindow.DisplayGridlines = False 

  'ActiveDocument.GetSheetObject("CH80").CopyBitMapToClipboard 

  'XLSheet.Paste 

 

  '-------Table

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

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

  'XLApp.Sheets.Add 

  XLApp.ActiveSheet.Name = "NLM Additional Details"

  XLApp.ActiveWindow.DisplayGridlines = False

  XLApp.Range("A46").Select 

  ActiveDocument.GetSheetObject("CH52").CopyTableToClipboard TRUE

  XLApp.ActiveSheet.PasteSpecial Paste = xlPasteValues

  XLApp.Selection.Borders.linestyle = xlContinuous

  XLApp.ActiveSheet.Range("A47").EntireRow.Delete

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

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

 

end sub 


Thanks,

Piyush

2 Replies
RSvebeck
Specialist
Specialist

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.


Robert

Svebeck Consulting AB
Not applicable
Author

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.

Thanks,

Piyush