Avatar of formi
formi
Flag for Switzerland asked on

protect sheet with delphi

Hi

I have a code to chenge some properties in Excel (using Delphi XE2). Now I can protect the Sheet with the code
ExcelApp.ActiveWorkBook.ActiveSheet.Protect('myPassword')

Open in new window

. What I Need to know: how can I control properties like "DrawingObjects:=True, Contents:=True, Scenarios:=True , AllowFiltering:=True" ... I think, the protect-method has more Parameters than the Password. But where can I find a description of this Parameters?

Thanks, Peter
DelphiMicrosoft Excel

Avatar of undefined
Last Comment
livestuff

8/22/2022 - Mon
livestuff

Hi Peter,

Sorry, I am not Familiar with ExcelApp, however, as with all object instances in delphi.....

When typing in the method, for example, the  ".Protect("   portion, stop and it should display the parameters it takes, and whether there are any overloaded methods you can use that have addiitional parameters.
ASKER CERTIFIED SOLUTION
Sinisa Vuk

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
formi

ASKER
Thanks, it works!
livestuff

LOL!  Of course it did. I think you should have learned how to get the parameters yourself rather than someone providing the code outright to you - because that is how you learnfor future references

Glad You got an answer you were seeking
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy