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

Changing Sheet Properties via vbMacro [Security]

Hi everyone

I need to change via VBMacro the settings of my Qvw before publishing on the server

It's a common operation i do every time i modify my presentation, just before the publication.

I need a fast code to switch from this situation

MWSnap 20111129175723.gif

to this

MWSnap 20111129175751.gif

anybody can help me?

1 Solution

Accepted Solutions
fosuzuki
Partner - Specialist III
Partner - Specialist III

hi Luky,

if you only select 'ISheetPermissions' in the Class field, you will get something like this:

qc.png

And so in the Member field you can find all the options that exist in the Security tab.

Regards,

Fernando

View solution in original post

4 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

Hi Lucky,

have you ever used the ApiGuide.qvw? There are a lot of useful information there, regarding on how to use the Automation API.

To configure the sheet permissions, you must use something like:

set mysheet=ActiveDocument.ActiveSheet

set sp=mysheet.GetProperties

sp.UserPermissions.AddSheetObject = false

mysheet.SetProperties sp

Check the class ISheetPermissions in the ApiGuide, to see how to set each Security parameter.

Hope this helps you.

Regards,

Fernando

Not applicable
Author

Thankyou so much Fernando

Your answer was so useful, I often use the ApiGuide.qvw

But in this case i cannot find the security Parameters to be set

MWSnap 20111201101257.gif

fosuzuki
Partner - Specialist III
Partner - Specialist III

hi Luky,

if you only select 'ISheetPermissions' in the Class field, you will get something like this:

qc.png

And so in the Member field you can find all the options that exist in the Security tab.

Regards,

Fernando

Not applicable
Author

Thankyou Fernando, all ok

I'm only trying to write the Vbmacro that involves the full collection of Sheets of the project...