Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Add sheet Macro is failed when i have upgraded QlikView 11.2 to 12.2.

I got the error like Macro parse failed. functionality was lost.

I am not able to add new sheet . please anyone provide some suggestion\resolution on it.

9 Replies
Anonymous
Not applicable
Author

Hi Pradip,


Can you share the macro code or application ? We will check from end also.


Thanks,

Venkata Sreekanth

Anonymous
Not applicable
Author

Sub AddSheet

Set newsheet=ActiveDocument.CreateSheet

Set sp=newsheet.GetProperties

'sp.Name="Tab" & Right(sp.Name,1)

sp.TabAttr.FgColor.PrimaryCol.Col = RGB(0,0,128)

sp.ZoomFactor=0.78

newsheet.SetProperties sp

newsheet.Activate

ActiveDocument.ActiveSheet.Promote

End Sub


Sub FitZoom

ActiveDocument.ActiveSheet.FitZoomToWindow

End Sub

Macro.PNG

I have tried Ctrl+shift+m , where i have choose first option to allow execution of macro but it did not work.

Server side i have ticked 'Allow macro execution in server', but issue is still there.

Anonymous
Not applicable
Author

Could anyone please reply on above issue.

Anonymous
Not applicable
Author

Hi Pradip,


Can you change the setting as like below.

Requested Module Security : Safe Mode

Current Local Security : Allow System Access


Regards,

Venkata Sreekanth

Anonymous
Not applicable
Author

As per your reply, I have applied changes. But still error is there. In Document properties setting , I have ticked the  Add Sheet in User Privileges. After this I am able to add the sheet. But I am not able to add new sheet object.

Please could you provide some solution for that.

Anonymous
Not applicable
Author

Hi Pradip,


Can you check wether you have same settings in Document Properties & Sheet Properties.


c2.PNG

c1.PNG

Anonymous
Not applicable
Author

Thanks for the reply. I have verified this setting and it is same as you have mentioned. but the issue is still there. 

jonathandienst
Partner - Champion III
Partner - Champion III

I would comment out all the lines in Sub Addsheet. Try running that. It will do nothing, of course, but if you get no error, than uncomment the lines one at a time and run the macro again. That will help to isolate the error cause.

It would appear that the API has changed slightly and that is causing the Sub to fail.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

There is no issue with Add Sheet macro after enabled the Add sheet option in security tab in Document properties. the problem is that I am not able to add new sheet object.