Link to home
Start Free TrialLog in
Avatar of formi
formiFlag 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
Avatar of livestuff
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
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of formi

ASKER

Thanks, it works!
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