Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

User can't export to QVD with macro

Hi!

I've created a simple macro which gives the user a possibility to export a table to a QVD using a macro. It looks like this:

sub ExportObject()

set v=ActiveDocument.getVariable("vChosenWeek")

set u=ActiveDocument.getVariable("vChosenYear")

path="E:\QlikView\SourceDocuments\QVD\History\"

Filename="Week "&v.getContent.string & " " &u.getContent.string & ".qvd"

call test("CH173",path&Filename)

end Sub

sub test(objectID,FilePath)

set v=ActiveDocument.getVariable("vChosenWeek")

set u=ActiveDocument.getVariable("vChosenYear")

set o = ActiveDocument.GetSheetObject(objectID)

o.Exportbiff FilePath

set o=nothing

msgbox("Week"&v.getContent.string &" år " &u.getContent.string &" exportet." )

end sub

This works for my administrator-user. But it doesnt work for other users, allthough I did give them access to the folder where the QVD is created.

Any suggestions on how to solve this?

1 Solution

Accepted Solutions
marcus_sommer

I have also none entries about security in settings.ini. I think those entries will only set if anything became forbidden. For test you could remove this file (after backup) - the settings.ini will new create. I think other settings/access rights are wrong, possibly the path is wrong for the user and E: is here another source.

View solution in original post

13 Replies
jonathan_dau
Contributor III
Contributor III

Hi,

Did you try to check 'Macro Override Security' in Properties --> Security -->

Hope that helps

Regards

Jonathan

Not applicable
Author

Hi!

I already checked that box, doesn't help I'm afraid.

Any other suggestions?

Sokkorn
Master
Master

Hi,

Make sure you use System Access

Untitled.png

Regards,

Sokkorn

Not applicable
Author

Sorry for the late reply. I tried that, didn't help I'm afraid.

marcus_sommer

Check the settings in user- and document-properties in tab security and the settings.ini from the users:

C:\Users\USER\AppData\Roaming\QlikTech\QlikView\settings.ini (macro execution could be forbidden)

- Marcus

Anonymous
Not applicable
Author

Try this from API Guide:

set obj = ActiveDocument.GetSheetObject("CH01")

obj.ExportEx "C:\test.qvd", 4      '4 = qvd

Not applicable
Author

Didn't work either I'm afraid 😕

marcus_sommer

Work other simple macros like msgbox? Receives the user a security message about macro execution?

Not applicable
Author

Yes the user gets the msgbox so I guess the macro is being executed, but the file isn't created for some reason.