Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
olaoyesunday1
Contributor III
Contributor III

Unable to Fire Macros

I wrote the below Macro code using VBScript  I know the code is correct. Anytime I press the button attached to macro on my system instead of the script to fire it was reopening the macro editor. please, what can I do apart from changing module security to system access in which I did but it is not running. 

Sub HideTabRow
Set DocProp = ActiveDocument.GetProperties
DocProp.ShowTabRow=False
ActiveDocument.SetProperties DocuProp
End Sub

Sub ShowTabRow
Set DocProp = ActiveDocument.GetProperties
DocProp.ShowTabRow=True
ActiveDocument.SetProperties DocuProp
End Sub

 

Labels (2)
1 Solution

Accepted Solutions
marcus_sommer

You have a typo in both routines - see the red:

DocProp.ShowTabRow=False
ActiveDocument.SetProperties DocuProp

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

When the macro editor opens like that, it indicates a runtime error is occuring in the vbscript.  With the macro editor open, click the "Test" button to test your sub and get a better error message.

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

 

olaoyesunday1
Contributor III
Contributor III
Author

@rwunderlich  Thanks very much. But I tried and couldn't find any error. The screenshots of the code are below:

 

marcus_sommer

You have a typo in both routines - see the red:

DocProp.ShowTabRow=False
ActiveDocument.SetProperties DocuProp

olaoyesunday1
Contributor III
Contributor III
Author

@marcus_sommer 

Thanks very much . It works now